/**
 *
 */
import Util;
import OpenApi;
import OpenApiUtil;
import EndpointUtil;

extends OpenApi;


init(config: OpenApi.Config){
  super(config);
  @signatureAlgorithm = 'v2';
  @endpointRule = 'regional';
  @endpointMap = {
    'ap-northeast-2-pop' = 'cs.aliyuncs.com',
    'cn-beijing-finance-pop' = 'cs.aliyuncs.com',
    'cn-beijing-gov-1' = 'cs.aliyuncs.com',
    'cn-beijing-nu16-b01' = 'cs.aliyuncs.com',
    'cn-edge-1' = 'cs.aliyuncs.com',
    'cn-fujian' = 'cs.aliyuncs.com',
    'cn-haidian-cm12-c01' = 'cs.aliyuncs.com',
    'cn-hangzhou-bj-b01' = 'cs.aliyuncs.com',
    'cn-hangzhou-internal-prod-1' = 'cs.aliyuncs.com',
    'cn-hangzhou-internal-test-1' = 'cs.aliyuncs.com',
    'cn-hangzhou-internal-test-2' = 'cs.aliyuncs.com',
    'cn-hangzhou-internal-test-3' = 'cs.aliyuncs.com',
    'cn-hangzhou-test-306' = 'cs.aliyuncs.com',
    'cn-hongkong-finance-pop' = 'cs.aliyuncs.com',
    'cn-qingdao-nebula' = 'cs.aliyuncs.com',
    'cn-shanghai-et15-b01' = 'cs.aliyuncs.com',
    'cn-shanghai-et2-b01' = 'cs.aliyuncs.com',
    'cn-shanghai-inner' = 'cs.aliyuncs.com',
    'cn-shanghai-internal-test-1' = 'cs.aliyuncs.com',
    'cn-shenzhen-inner' = 'cs.aliyuncs.com',
    'cn-shenzhen-st4-d01' = 'cs.aliyuncs.com',
    'cn-shenzhen-su18-b01' = 'cs.aliyuncs.com',
    'cn-wuhan' = 'cs.aliyuncs.com',
    'cn-yushanfang' = 'cs.aliyuncs.com',
    'cn-zhangbei' = 'cs.aliyuncs.com',
    'cn-zhangbei-na61-b01' = 'cs.aliyuncs.com',
    'cn-zhangjiakou-na62-a01' = 'cs.aliyuncs.com',
    'cn-zhengzhou-nebula-1' = 'cs.aliyuncs.com',
    'eu-west-1-oxs' = 'cs.aliyuncs.com',
    'rus-west-1-pop' = 'cs.aliyuncs.com',
  };

  checkConfig(config);
  @endpoint = getEndpoint('cs', @regionId, @endpointRule, @network, @suffix, @endpointMap, @endpoint);
}

function getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: map[string]string, endpoint: string) throws: string{
  if (!Util.empty(endpoint)) {
    return endpoint;
  }
  
  if (!Util.isUnset(endpointMap) && !Util.empty(endpointMap[regionId])) {
    return endpointMap[regionId];
  }
  return EndpointUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix);
}

model Addon {
  config?: string(name='config', example='{\\"IngressSlbNetworkType\\":\\"internet\\"}'),
  disabled?: boolean(name='disabled', example='false'),
  name?: string(name='name', example='nginx-ingress-controller'),
  version?: string(name='version', example='v1.9.3-aliyun.1'),
}

model ContainerdConfig {
  insecureRegistries?: [ string ](name='insecureRegistries'),
  registryMirrors?: [ string ](name='registryMirrors'),
}

model DataDisk {
  autoFormat?: boolean(name='auto_format', example='true'),
  autoSnapshotPolicyId?: string(name='auto_snapshot_policy_id', example='sp-2zej1nogjvovnz4z****'),
  burstingEnabled?: boolean(name='bursting_enabled', example='true'),
  category?: string(name='category', example='cloud_ssd'),
  device?: string(name='device', example='/dev/xvdb'),
  diskName?: string(name='disk_name', example='DataDiskName'),
  encrypted?: string(name='encrypted', example='true'),
  fileSystem?: string(name='file_system', example='ext4'),
  kmsKeyId?: string(name='kms_key_id', example='0e478b7a-4262-4802-b8cb-00d3fb40****'),
  mountTarget?: string(name='mount_target', example='/mnt/path1'),
  performanceLevel?: string(name='performance_level', example='PL1'),
  provisionedIops?: long(name='provisioned_iops', example='1000'),
  size?: long(name='size', example='40'),
  snapshotId?: string(name='snapshot_id', example='s-280s7****'),
}

model InstancePatterns {
  architectures?: [ string ](name='architectures', deprecated=true),
  burstPerformanceOption?: string(name='burst_performance_option', example='Exclude', deprecated=true),
  core?: long(name='core', example='4', deprecated=true),
  cores?: long(name='cores', example='4'),
  cpuArchitectures?: [ string ](name='cpu_architectures'),
  excludedInstanceTypes?: [ string ](name='excluded_instance_types'),
  instanceCategories?: [ string ](name='instance_categories'),
  instanceFamilyLevel?: string(name='instance_family_level', example='EnterpriseLevel'),
  instanceTypeFamilies?: [ string ](name='instance_type_families'),
  maxCpuCores?: long(name='max_cpu_cores', example='8'),
  maxMemorySize?: float(name='max_memory_size', example='16'),
  maxPrice?: float(name='max_price', example='2', deprecated=true),
  maximumGpuAmount?: long(name='maximum_gpu_amount'),
  memory?: float(name='memory', example='8'),
  minCpuCores?: long(name='min_cpu_cores', example='4'),
  minMemorySize?: float(name='min_memory_size', example='8'),
  minimumEniIpv6AddressQuantity?: long(name='minimum_eni_ipv6_address_quantity'),
  minimumEniPrivateIpAddressQuantity?: long(name='minimum_eni_private_ip_address_quantity'),
  minimumEniQuantity?: long(name='minimum_eni_quantity'),
}

model KubeletConfig {
  allowedUnsafeSysctls?: [ string ](name='allowedUnsafeSysctls'),
  clusterDNS?: [ string ](name='clusterDNS'),
  containerLogMaxFiles?: long(name='containerLogMaxFiles', example='5'),
  containerLogMaxSize?: string(name='containerLogMaxSize', example='10Mi'),
  containerLogMaxWorkers?: int32(name='containerLogMaxWorkers', example='1'),
  containerLogMonitorInterval?: string(name='containerLogMonitorInterval', example='10s'),
  cpuCFSQuota?: boolean(name='cpuCFSQuota', example='true'),
  cpuCFSQuotaPeriod?: string(name='cpuCFSQuotaPeriod', example='100ms'),
  cpuManagerPolicy?: string(name='cpuManagerPolicy', example='none'),
  eventBurst?: long(name='eventBurst', example='10'),
  eventRecordQPS?: long(name='eventRecordQPS', example='5'),
  evictionHard?: map[string]any(name='evictionHard'),
  evictionSoft?: map[string]any(name='evictionSoft'),
  evictionSoftGracePeriod?: map[string]any(name='evictionSoftGracePeriod'),
  featureGates?: map[string]any(name='featureGates'),
  imageGCHighThresholdPercent?: int32(name='imageGCHighThresholdPercent', example='85'),
  imageGCLowThresholdPercent?: int32(name='imageGCLowThresholdPercent', example='80'),
  kubeAPIBurst?: long(name='kubeAPIBurst', example='10'),
  kubeAPIQPS?: long(name='kubeAPIQPS', example='5'),
  kubeReserved?: map[string]any(name='kubeReserved'),
  maxPods?: long(name='maxPods', example='110'),
  memoryManagerPolicy?: string(name='memoryManagerPolicy', example='none'),
  podPidsLimit?: long(name='podPidsLimit', example='-1'),
  readOnlyPort?: long(name='readOnlyPort', example='0'),
  registryBurst?: long(name='registryBurst', example='10'),
  registryPullQPS?: long(name='registryPullQPS', example='5'),
  reservedMemory?: [ 
    {
      limits?: map[string]any(name='limits'),
      numaNode?: int32(name='numaNode'),
    }
  ](name='reservedMemory'),
  serializeImagePulls?: boolean(name='serializeImagePulls', example='true'),
  systemReserved?: map[string]any(name='systemReserved'),
  topologyManagerPolicy?: string(name='topologyManagerPolicy', example='restricted'),
  tracing?: {
    endpoint?: string(name='endpoint', example='localhost:4317'),
    samplingRatePerMillion?: int32(name='samplingRatePerMillion'),
  }(name='tracing'),
}

model MaintenanceWindow {
  duration?: string(name='duration', example='3h'),
  enable?: boolean(name='enable', example='false'),
  maintenanceTime?: string(name='maintenance_time', example='2020-10-15T12:31:00.000+08:00'),
  recurrence?: string(name='recurrence', example='FREQ=WEEKLY;INTERVAL=4;BYDAY=MO,TU'),
  weeklyPeriod?: string(name='weekly_period', example='Monday,Thursday'),
}

model Nodepool {
  autoScaling?: {
    eipBandwidth?: long(name='eip_bandwidth', example='5', deprecated=true),
    eipInternetChargeType?: string(name='eip_internet_charge_type', example='PayByBandwidth', deprecated=true),
    enable?: boolean(name='enable', description='This parameter is required.', example='true'),
    isBondEip?: boolean(name='is_bond_eip', example='true', deprecated=true),
    maxInstances?: long(name='max_instances', description='This parameter is required.', example='10'),
    minInstances?: long(name='min_instances', description='This parameter is required.', example='0'),
    type?: string(name='type', example='cpu'),
  }(name='auto_scaling'),
  count?: long(name='count', example='1', deprecated=true),
  interconnectConfig?: {
    bandwidth?: long(name='bandwidth', example='10', deprecated=true),
    ccnId?: string(name='ccn_id', example='ccn-qm5i0i0q9yi*******', deprecated=true),
    ccnRegionId?: string(name='ccn_region_id', example='cn-shanghai', deprecated=true),
    cenId?: string(name='cen_id', example='cen-ey9k9nfhz0f*******', deprecated=true),
    improvedPeriod?: string(name='improved_period', example='1', deprecated=true),
  }(name='interconnect_config', deprecated=true),
  interconnectMode?: string(name='interconnect_mode', example='basic'),
  kubernetesConfig?: {
    cmsEnabled?: boolean(name='cms_enabled', example='true'),
    cpuPolicy?: string(name='cpu_policy', example='none'),
    labels?: [
      Tag
    ](name='labels'),
    nodeNameMode?: string(name='node_name_mode', example='customized,test.,5,.com'),
    runtime?: string(name='runtime', description='This parameter is required.', example='docker'),
    runtimeVersion?: string(name='runtime_version', description='This parameter is required.', example='19.03.5'),
    taints?: [
      Taint
    ](name='taints'),
    userData?: string(name='user_data', example='MXM='),
  }(name='kubernetes_config'),
  management?: {
    autoRepair?: boolean(name='auto_repair', example='true'),
    autoRepairPolicy?: {
      restartNode?: boolean(name='restart_node', example='true'),
    }(name='auto_repair_policy'),
    autoUpgrade?: boolean(name='auto_upgrade', example='true'),
    autoUpgradePolicy?: {
      autoUpgradeKubelet?: boolean(name='auto_upgrade_kubelet', example='true'),
    }(name='auto_upgrade_policy'),
    autoVulFix?: boolean(name='auto_vul_fix', example='true'),
    autoVulFixPolicy?: {
      restartNode?: boolean(name='restart_node', example='true'),
      vulLevel?: string(name='vul_level', example='asap,nntf'),
    }(name='auto_vul_fix_policy'),
    enable?: boolean(name='enable', example='true'),
    upgradeConfig?: {
      autoUpgrade?: boolean(name='auto_upgrade', example='true'),
      maxUnavailable?: long(name='max_unavailable', example='1'),
      surge?: long(name='surge', example='5'),
      surgePercentage?: long(name='surge_percentage', example='50'),
    }(name='upgrade_config', deprecated=true),
  }(name='management'),
  maxNodes?: long(name='max_nodes', example='10'),
  nodeConfig?: {
    kubeletConfiguration?: KubeletConfig(name='kubelet_configuration'),
  }(name='node_config'),
  nodepoolInfo?: {
    name?: string(name='name', description='This parameter is required.', example='np-test'),
    resourceGroupId?: string(name='resource_group_id', example='rg-acfmyvw3wjm****'),
    type?: string(name='type', example='ess'),
  }(name='nodepool_info'),
  scalingGroup?: {
    autoRenew?: boolean(name='auto_renew', example='false'),
    autoRenewPeriod?: long(name='auto_renew_period', example='0'),
    compensateWithOnDemand?: boolean(name='compensate_with_on_demand', example='true'),
    dataDisks?: [
      DataDisk
    ](name='data_disks'),
    deploymentsetId?: string(name='deploymentset_id', example='ds-bp1d19mmbsv3jf6xxxxx'),
    desiredSize?: long(name='desired_size', example='2'),
    imageId?: string(name='image_id', example='aliyun_2_1903_x64_20G_alibase_20200904.vhd'),
    imageType?: string(name='image_type', example='AliyunLinux'),
    instanceChargeType?: string(name='instance_charge_type', description='This parameter is required.', example='PostPaid'),
    instanceTypes?: [ string ](name='instance_types', description='This parameter is required.'),
    internetChargeType?: string(name='internet_charge_type', example='PayByBandwidth'),
    internetMaxBandwidthOut?: long(name='internet_max_bandwidth_out', example='10'),
    keyPair?: string(name='key_pair', example='np-key'),
    loginAsNonRoot?: boolean(name='login_as_non_root'),
    loginPassword?: string(name='login_password', example='Hello1234,,'),
    multiAzPolicy?: string(name='multi_az_policy', example='COST_OPTIMIZED'),
    onDemandBaseCapacity?: long(name='on_demand_base_capacity', example='0'),
    onDemandPercentageAboveBaseCapacity?: long(name='on_demand_percentage_above_base_capacity', example='20'),
    period?: long(name='period', example='0'),
    periodUnit?: string(name='period_unit', example='Month'),
    platform?: string(name='platform', example='AliyunLinux', deprecated=true),
    privatePoolOptions?: {
      id?: string(name='id'),
      matchCriteria?: string(name='match_criteria'),
    }(name='private_pool_options'),
    ramRoleName?: string(name='ram_role_name', example='example-role'),
    rdsInstances?: [ string ](name='rds_instances'),
    scalingPolicy?: string(name='scaling_policy', example='release'),
    securityGroupId?: string(name='security_group_id', example='sg-2zeihch86ooz9io4****'),
    securityGroupIds?: [ string ](name='security_group_ids'),
    spotInstancePools?: long(name='spot_instance_pools', example='5'),
    spotInstanceRemedy?: boolean(name='spot_instance_remedy', example='false'),
    spotPriceLimit?: [ 
      {
        instanceType?: string(name='instance_type', example='ecs.c6.large'),
        priceLimit?: string(name='price_limit', example='0.39'),
      }
    ](name='spot_price_limit'),
    spotStrategy?: string(name='spot_strategy', example='NoSpot'),
    systemDiskBurstingEnabled?: boolean(name='system_disk_bursting_enabled', example='true'),
    systemDiskCategories?: [ string ](name='system_disk_categories'),
    systemDiskCategory?: string(name='system_disk_category', example='cloud_efficiency'),
    systemDiskEncryptAlgorithm?: string(name='system_disk_encrypt_algorithm', example='aes-256'),
    systemDiskEncrypted?: boolean(name='system_disk_encrypted'),
    systemDiskKmsKeyId?: string(name='system_disk_kms_key_id', example='0e478b7a-4262-4802-b8cb-00d3fb40****'),
    systemDiskPerformanceLevel?: string(name='system_disk_performance_level', example='PL1'),
    systemDiskProvisionedIops?: long(name='system_disk_provisioned_iops', example='1000'),
    systemDiskSize?: long(name='system_disk_size', example='120'),
    tags?: [ 
      {
        key?: string(name='key', example='key'),
        value?: string(name='value', example='value'),
      }
    ](name='tags'),
    vswitchIds?: [ string ](name='vswitch_ids', description='This parameter is required.'),
  }(name='scaling_group'),
  teeConfig?: {
    teeEnable?: boolean(name='tee_enable', description='This parameter is required.', example='false'),
  }(name='tee_config'),
}

model Runtime {
  name?: string(name='name', example='docker'),
  version?: string(name='version', example='19.03.5'),
}

model Tag {
  key?: string(name='key', example='env'),
  value?: string(name='value', example='prod'),
}

model Taint {
  effect?: string(name='effect', example='NoSchedule'),
  key?: string(name='key', example='key'),
  value?: string(name='value', example='value'),
}

model StandardComponentsValue = {
  name?: string(name='name', description='The name of the component.', example='ack-arena'),
  version?: string(name='version', description='The version of the component.', example='0.5.0'),
  description?: string(name='description', description='The description of the component.', example='***'),
  required?: string(name='required', description='Indicates whether the component is a required component. Valid values:

*   `true`: The component is required and must be installed when a cluster is created.
*   `false`: The component is optional. After a cluster is created, you can go to the `Add-ons` page to install the component.', example='false'),
  disabled?: boolean(name='disabled', description='Indicates whether the automatic installation of the component is disabled. By default, some optional components, such as components for logging and Ingresses, are installed when a cluster is created. You can set this parameter to disable automatic component installation. Valid values:

*   `true`: disables automatic component installation.
*   `false`: enables automatic component installation.', example='false'),
}

model QuotasValue = {
  quota?: string(name='quota', description='The value of the quota. If the quota limit is reached, submit an application in the [Quota Center console](https://quotas.console.aliyun.com/products/csk/quotas) to increase the quota.', example='1'),
  operationCode?: string(name='operation_code', description='The quota code.', example='q_Kubernetes_Cluster'),
  adjustable?: boolean(name='adjustable', description='Indicates whether the quota is adjustable.', example='true'),
  unit?: string(name='unit', description='The unit.', example='Cluster'),
}

model AttachInstancesRequest {
  cpuPolicy?: string(name='cpu_policy', description='The CPU management policy of the node. The following policies are supported if the Kubernetes version of the cluster is 1.12.6 or later:

*   `static`: allows pods with specific resource characteristics on the node to be granted enhanced CPU affinity and exclusivity.
*   `none`: uses default CPU affinity.

Default value: `none`

>  This parameter is not supported if you specify `nodepool_id`.', example='none'),
  formatDisk?: boolean(name='format_disk', description='Specifies whether to store container data and images on data disks. Valid value:

*   `true`: stores container data and images on data disks.
*   `false`: does not store container data or images on data disks.

Default value: `false`.

How data disks are attached:

*   If the ECS instance is already attached with data disks and the file system of the last data disk is not initialized, the system automatically formats this data disk to ext4. Then, the system uses the disk to store the data in the /var/lib/docker and /var/lib/kubelet directories.
*   If no data disk is attached to the ECS instance, the system does not purchase a new data disk.

>  If you choose to store container data and images on data disks and a data disk is already attached to the ECS instance, the original data on this data disk is cleared. You can back up the disk to prevent data loss.', example='false'),
  imageId?: string(name='image_id', description='The custom image ID. If you do not specify this parameter, the default system image is used.

> 

*   If you specify a custom image, the custom image is used to deploy the operating system on the system disk of the node.

*   This parameter is not supported if you specify `nodepool_id`.', example='aliyun_2_1903_x64_20G_alibase_20200529.vhd'),
  instances?: [ string ](name='instances', description='The ECS instances that you want to add.

This parameter is required.'),
  isEdgeWorker?: boolean(name='is_edge_worker', description='Specifies whether the node that you want to add is an Edge Node Service (ENS) node. Valid value:

*   `true`: the node that you want to add is an ENS node.
*   `false`: the node that you want to add is not an ENS node.

Default value: `false`.

>  If the node that you want to add is an ENS node, you must set the value to `true`. This allows you to identify the node.', example='false'),
  keepInstanceName?: boolean(name='keep_instance_name', description='Specifies whether to retain the instance name. Valid value:

*   `true`: retains the instance name.
*   `false`: does not retain the instance name.

Default value: `false`.', example='true'),
  keyPair?: string(name='key_pair', description='The name of the key pair used to log on to the ECS instances. You must specify this parameter or `login_password`.

>  This parameter is not supported if you specify `nodepool_id`.', example='secrity-key'),
  nodepoolId?: string(name='nodepool_id', description='The ID of the node pool to which the node is added. If you do not specify this parameter, the node is added to the default node pool.', example='np615c0e0966124216a0412e10afe0****'),
  password?: string(name='password', description='The SSH logon password used to log on to the ECS instances. You must specify this parameter or `key_pair`. The password must be 8 to 30 characters in length, and must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters. The password cannot contain backslashes (\\\\\\\\) or double quotation marks (").

The password is encrypted during data transfer to ensure security.', example='Hello1234'),
  rdsInstances?: [ string ](name='rds_instances', description='A list of ApsaraDB RDS instances.'),
  runtime?: Runtime(name='runtime', description='The container runtime.

>  This parameter is not supported if you specify `nodepool_id`.'),
  tags?: [
    Tag
  ](name='tags', description='The labels that you want to add to the node. When you add labels to a node, the following rules apply:

*   A label is a case-sensitive key-value pair. You can add up to 20 labels.
*   The key must be unique and cannot exceed 64 characters in length. The value can be empty and cannot exceed 128 characters in length. Keys and values cannot start with `aliyun`, `acs:`, `https://`, or `http://`. For more information, see [Labels and Selectors](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#syntax-and-character-set).

>  This parameter is not supported if you specify `nodepool_id`.'),
  userData?: string(name='user_data', description='The user-defined data on the node. For more information, see [Use instance user data to automatically run commands or scripts on instance startup](https://help.aliyun.com/document_detail/49121.html).

>  This parameter is not supported if you specify `nodepool_id`.', example='IyEvdXNyL2Jpbi9iYXNoCmVjaG8gIkhlbGxvIEFDSyEi'),
}

model AttachInstancesResponseBody = {
  list?: [ 
    {
      code?: string(name='code', description='The code that indicates the task result.', example='200'),
      instanceId?: string(name='instanceId', description='The ID of the ECS instance.', example='i-2ze0lgm3y6iylcbt****'),
      message?: string(name='message', description='Indicates whether the ECS instance is successfully added to the ACK cluster.', example='successful'),
    }
  ](name='list', description='The details of the added nodes.'),
  taskId?: string(name='task_id', description='The task ID.', example='T-5a544aff80282e39ea000039'),
}

model AttachInstancesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: AttachInstancesResponseBody(name='body'),
}

/**
 * @summary Adds existing Elastic Compute Service (ECS) instances to a Container Service for Kubernetes (ACK) cluster.
 *
 * @param request AttachInstancesRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return AttachInstancesResponse
 */
async function attachInstancesWithOptions(ClusterId: string, request: AttachInstancesRequest, headers: map[string]string, runtime: Util.RuntimeOptions): AttachInstancesResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.cpuPolicy)) {
    body['cpu_policy'] = request.cpuPolicy;
  }
  if (!Util.isUnset(request.formatDisk)) {
    body['format_disk'] = request.formatDisk;
  }
  if (!Util.isUnset(request.imageId)) {
    body['image_id'] = request.imageId;
  }
  if (!Util.isUnset(request.instances)) {
    body['instances'] = request.instances;
  }
  if (!Util.isUnset(request.isEdgeWorker)) {
    body['is_edge_worker'] = request.isEdgeWorker;
  }
  if (!Util.isUnset(request.keepInstanceName)) {
    body['keep_instance_name'] = request.keepInstanceName;
  }
  if (!Util.isUnset(request.keyPair)) {
    body['key_pair'] = request.keyPair;
  }
  if (!Util.isUnset(request.nodepoolId)) {
    body['nodepool_id'] = request.nodepoolId;
  }
  if (!Util.isUnset(request.password)) {
    body['password'] = request.password;
  }
  if (!Util.isUnset(request.rdsInstances)) {
    body['rds_instances'] = request.rdsInstances;
  }
  if (!Util.isUnset(request.runtime)) {
    body['runtime'] = request.runtime;
  }
  if (!Util.isUnset(request.tags)) {
    body['tags'] = request.tags;
  }
  if (!Util.isUnset(request.userData)) {
    body['user_data'] = request.userData;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'AttachInstances',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/clusters/${OpenApiUtil.getEncodeParam(ClusterId)}/attach`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Adds existing Elastic Compute Service (ECS) instances to a Container Service for Kubernetes (ACK) cluster.
 *
 * @param request AttachInstancesRequest
 * @return AttachInstancesResponse
 */
async function attachInstances(ClusterId: string, request: AttachInstancesRequest): AttachInstancesResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return attachInstancesWithOptions(ClusterId, request, headers, runtime);
}

model AttachInstancesToNodePoolRequest {
  formatDisk?: boolean(name='format_disk', description='Specifies whether to store container data and images on data disks. Valid values:

*   `true`: stores container data and images on data disks.
*   `false`: does not store container data or images on data disks.

Default value: `false`.

How to mount a data disk:

*   If the ECS instances are already mounted with data disks and the file system of the last data disk is not initialized, the system automatically formats this data disk to ext4 and mounts it to /var/lib/docker and /var/lib/kubelet.
*   If no data disk is attached to the ECS instances, the system does not purchase a new data disk.

> If you choose to store container data and images on a data disk and the data disk is already mounted to the ECS instance, the existing data on the data disk will be cleared. You can back up the disk to avoid data loss.', example='false'),
  instances?: [ string ](name='instances', description='The IDs of the instances to be added.'),
  keepInstanceName?: boolean(name='keep_instance_name', description='Specifies whether to retain the instance name. Valid values:

*   `true`: retains the instance name.
*   `false`: does not retain the instance name.

Default value: `true`.', example='true'),
  password?: string(name='password', description='The SSH password that is used to log on to the instance.', example='Hello1234'),
}

model AttachInstancesToNodePoolResponseBody = {
  requestId?: string(name='request_id', description='The request ID.', example='D7631D83-6E98-1949-B665-766A62xxxxxx'),
  taskId?: string(name='task_id', description='The task ID.', example='T-5a54309c80282e39ea00002f'),
}

model AttachInstancesToNodePoolResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: AttachInstancesToNodePoolResponseBody(name='body'),
}

/**
 * @summary Adds existing nodes to a specific node pool. You can add existing ECS instances to a specific node pool in a Container Service for Kubernetes (ACK) cluster as worker nodes. You can also add removed worker nodes back to the node pool.
 *
 * @param request AttachInstancesToNodePoolRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return AttachInstancesToNodePoolResponse
 */
async function attachInstancesToNodePoolWithOptions(ClusterId: string, NodepoolId: string, request: AttachInstancesToNodePoolRequest, headers: map[string]string, runtime: Util.RuntimeOptions): AttachInstancesToNodePoolResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.formatDisk)) {
    body['format_disk'] = request.formatDisk;
  }
  if (!Util.isUnset(request.instances)) {
    body['instances'] = request.instances;
  }
  if (!Util.isUnset(request.keepInstanceName)) {
    body['keep_instance_name'] = request.keepInstanceName;
  }
  if (!Util.isUnset(request.password)) {
    body['password'] = request.password;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'AttachInstancesToNodePool',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/clusters/${OpenApiUtil.getEncodeParam(ClusterId)}/nodepools/${OpenApiUtil.getEncodeParam(NodepoolId)}/attach`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Adds existing nodes to a specific node pool. You can add existing ECS instances to a specific node pool in a Container Service for Kubernetes (ACK) cluster as worker nodes. You can also add removed worker nodes back to the node pool.
 *
 * @param request AttachInstancesToNodePoolRequest
 * @return AttachInstancesToNodePoolResponse
 */
async function attachInstancesToNodePool(ClusterId: string, NodepoolId: string, request: AttachInstancesToNodePoolRequest): AttachInstancesToNodePoolResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return attachInstancesToNodePoolWithOptions(ClusterId, NodepoolId, request, headers, runtime);
}

model CancelClusterUpgradeResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
}

/**
 * @deprecated OpenAPI CancelClusterUpgrade is deprecated
 *
 * @summary You can call the CancelClusterUpgrade operation to cancel the update of a cluster.
 *
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return CancelClusterUpgradeResponse
 */
// Deprecated
async function cancelClusterUpgradeWithOptions(ClusterId: string, headers: map[string]string, runtime: Util.RuntimeOptions): CancelClusterUpgradeResponse {
  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
  };
  var params = new OpenApi.Params{
    action = 'CancelClusterUpgrade',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/api/v2/clusters/${OpenApiUtil.getEncodeParam(ClusterId)}/upgrade/cancel`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'none',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @deprecated OpenAPI CancelClusterUpgrade is deprecated
 *
 * @summary You can call the CancelClusterUpgrade operation to cancel the update of a cluster.
 *
 * @return CancelClusterUpgradeResponse
 */
// Deprecated
async function cancelClusterUpgrade(ClusterId: string): CancelClusterUpgradeResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return cancelClusterUpgradeWithOptions(ClusterId, headers, runtime);
}

model CancelComponentUpgradeResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
}

/**
 * @deprecated OpenAPI CancelComponentUpgrade is deprecated
 *
 * @summary You can call the CancelComponentUpgrade operation to cancel the update of a component.
 *
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return CancelComponentUpgradeResponse
 */
// Deprecated
async function cancelComponentUpgradeWithOptions(clusterId: string, componentId: string, headers: map[string]string, runtime: Util.RuntimeOptions): CancelComponentUpgradeResponse {
  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
  };
  var params = new OpenApi.Params{
    action = 'CancelComponentUpgrade',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/clusters/${OpenApiUtil.getEncodeParam(clusterId)}/components/${OpenApiUtil.getEncodeParam(componentId)}/cancel`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'none',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @deprecated OpenAPI CancelComponentUpgrade is deprecated
 *
 * @summary You can call the CancelComponentUpgrade operation to cancel the update of a component.
 *
 * @return CancelComponentUpgradeResponse
 */
// Deprecated
async function cancelComponentUpgrade(clusterId: string, componentId: string): CancelComponentUpgradeResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return cancelComponentUpgradeWithOptions(clusterId, componentId, headers, runtime);
}

model CancelOperationPlanResponseBody = {
  requestId?: string(name='request_id', description='The request ID.', example='db82195b-75a8-40e5-9be4-16f1829dc624'),
}

model CancelOperationPlanResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CancelOperationPlanResponseBody(name='body'),
}

/**
 * @summary You can call the CancelOperationPlan operation to cancel a pending auto O\\\\\\\\\\\\&M plan.
 *
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return CancelOperationPlanResponse
 */
async function cancelOperationPlanWithOptions(planId: string, headers: map[string]string, runtime: Util.RuntimeOptions): CancelOperationPlanResponse {
  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
  };
  var params = new OpenApi.Params{
    action = 'CancelOperationPlan',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/operation/plans/${OpenApiUtil.getEncodeParam(planId)}`,
    method = 'DELETE',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary You can call the CancelOperationPlan operation to cancel a pending auto O\\\\\\\\\\\\&M plan.
 *
 * @return CancelOperationPlanResponse
 */
async function cancelOperationPlan(planId: string): CancelOperationPlanResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return cancelOperationPlanWithOptions(planId, headers, runtime);
}

model CancelTaskResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
}

/**
 * @summary Cancels the execution of a cluster task.
 *
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return CancelTaskResponse
 */
async function cancelTaskWithOptions(taskId: string, headers: map[string]string, runtime: Util.RuntimeOptions): CancelTaskResponse {
  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
  };
  var params = new OpenApi.Params{
    action = 'CancelTask',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/tasks/${OpenApiUtil.getEncodeParam(taskId)}/cancel`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'none',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Cancels the execution of a cluster task.
 *
 * @return CancelTaskResponse
 */
async function cancelTask(taskId: string): CancelTaskResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return cancelTaskWithOptions(taskId, headers, runtime);
}

model CheckControlPlaneLogEnableResponseBody = {
  aliuid?: string(name='aliuid', description='The ID of the Alibaba Cloud account to which the resource belongs.', example='162981*****'),
  components?: [ string ](name='components', description='The control plane components for which log collection is enabled.

This parameter is required.'),
  logProject?: string(name='log_project', description='The name of the Simple Log Service project that you want to use to store the logs of control plane components.

Default value: k8s-log-$Cluster ID.', example='k8s-log-c5b5e80b0b64a4bf6939d2d8fbbc5****'),
  logTtl?: string(name='log_ttl', description='The retention period of the log data stored in the Logstore. Valid values: 1 to 3000. Unit: days.

Default value: 30.', example='30'),
}

model CheckControlPlaneLogEnableResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CheckControlPlaneLogEnableResponseBody(name='body'),
}

/**
 * @summary Queries the current log configuration of control plane components, including the log retention period and the log collection component. Container Service for Kubernetes (ACK) managed clusters can collect the logs of control plane components and deliver the logs to projects in Simple Log Service. These control plane components include Kube API Server, Kube Scheduler, Kube Controller Manager, and Cloud Controller Manager.
 *
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return CheckControlPlaneLogEnableResponse
 */
async function checkControlPlaneLogEnableWithOptions(ClusterId: string, headers: map[string]string, runtime: Util.RuntimeOptions): CheckControlPlaneLogEnableResponse {
  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
  };
  var params = new OpenApi.Params{
    action = 'CheckControlPlaneLogEnable',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/clusters/${OpenApiUtil.getEncodeParam(ClusterId)}/controlplanelog`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Queries the current log configuration of control plane components, including the log retention period and the log collection component. Container Service for Kubernetes (ACK) managed clusters can collect the logs of control plane components and deliver the logs to projects in Simple Log Service. These control plane components include Kube API Server, Kube Scheduler, Kube Controller Manager, and Cloud Controller Manager.
 *
 * @return CheckControlPlaneLogEnableResponse
 */
async function checkControlPlaneLogEnable(ClusterId: string): CheckControlPlaneLogEnableResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return checkControlPlaneLogEnableWithOptions(ClusterId, headers, runtime);
}

model CheckServiceRoleRequest {
  roles?: [ 
    {
      name?: string(name='name', description='The name of the service role. For more information about ACK roles, see [ACK roles](https://help.aliyun.com/document_detail/86483.html).

This parameter is required.', example='AliyunCSManagedAutoScalerRole'),
    }
  ](name='roles', description='The service roles that you want to check.

This parameter is required.'),
}

model CheckServiceRoleResponseBody = {
  roles?: [ 
    {
      granted?: boolean(name='granted', description='Indicates whether the service role is assigned to ACK.

Valid values:

*   true: The role is assigned to ACK.
*   false: The role is not assigned to ACK.', example='true'),
      message?: string(name='message', description='The message that is displayed for a role that is not assigned to ACK.', example='The role does not exist: AliyunCSManagedAutoScalerRole'),
      name?: string(name='name', description='The name of the service role.', example='AliyunCSManagedAutoScalerRole'),
    }
  ](name='roles', description='The check results.'),
}

model CheckServiceRoleResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CheckServiceRoleResponseBody(name='body'),
}

/**
 * @summary Checks whether the specified service roles are granted to Container Service for Kubernetes (ACK) within the current Alibaba Cloud account. ACK can access other cloud services, such as Elastic Compute Service (ECS), Object Storage Service (OSS), File Storage NAS (NAS), and Server Load Balancer (SLB), only after ACK is assigned the required service roles.
 *
 * @param request CheckServiceRoleRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return CheckServiceRoleResponse
 */
async function checkServiceRoleWithOptions(request: CheckServiceRoleRequest, headers: map[string]string, runtime: Util.RuntimeOptions): CheckServiceRoleResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.roles)) {
    body['roles'] = request.roles;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CheckServiceRole',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/ram/check-service-role`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Checks whether the specified service roles are granted to Container Service for Kubernetes (ACK) within the current Alibaba Cloud account. ACK can access other cloud services, such as Elastic Compute Service (ECS), Object Storage Service (OSS), File Storage NAS (NAS), and Server Load Balancer (SLB), only after ACK is assigned the required service roles.
 *
 * @param request CheckServiceRoleRequest
 * @return CheckServiceRoleResponse
 */
async function checkServiceRole(request: CheckServiceRoleRequest): CheckServiceRoleResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return checkServiceRoleWithOptions(request, headers, runtime);
}

model CleanClusterUserPermissionsRequest {
  force?: boolean(name='Force', description='Specifies whether to forcefully delete the specified kubeconfig files. Valid values:

*   false (default): checks the cluster access records within the previous seven days before deleting the kubeconfig files. The kubeconfig files are not deleted if cluster access records are found or fail to be retrieved.
*   true: forcefully deletes the kubeconfig files without checking the cluster access records.', example='false'),
}

model CleanClusterUserPermissionsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
}

/**
 * @summary Deletes kubeconfig files that may pose potential risks from a user and revokes Role-Based Access Control (RBAC) permissions on a cluster.
 *
 * @description > 
 * *   To call this operation, make sure that you have the AliyunCSFullAccess permission.
 * *   You cannot revoke the permissions of an Alibaba Cloud account.
 * *   You cannot revoke the permissions of the account that you use to call this operation.
 *
 * @param request CleanClusterUserPermissionsRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return CleanClusterUserPermissionsResponse
 */
async function cleanClusterUserPermissionsWithOptions(ClusterId: string, Uid: string, request: CleanClusterUserPermissionsRequest, headers: map[string]string, runtime: Util.RuntimeOptions): CleanClusterUserPermissionsResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.force)) {
    query['Force'] = request.force;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CleanClusterUserPermissions',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/cluster/${OpenApiUtil.getEncodeParam(ClusterId)}/user/${OpenApiUtil.getEncodeParam(Uid)}/permissions`,
    method = 'DELETE',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'none',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Deletes kubeconfig files that may pose potential risks from a user and revokes Role-Based Access Control (RBAC) permissions on a cluster.
 *
 * @description > 
 * *   To call this operation, make sure that you have the AliyunCSFullAccess permission.
 * *   You cannot revoke the permissions of an Alibaba Cloud account.
 * *   You cannot revoke the permissions of the account that you use to call this operation.
 *
 * @param request CleanClusterUserPermissionsRequest
 * @return CleanClusterUserPermissionsResponse
 */
async function cleanClusterUserPermissions(ClusterId: string, Uid: string, request: CleanClusterUserPermissionsRequest): CleanClusterUserPermissionsResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return cleanClusterUserPermissionsWithOptions(ClusterId, Uid, request, headers, runtime);
}

model CleanUserPermissionsRequest {
  clusterIds?: [ string ](name='ClusterIds', description='The cluster IDs. If you specify a list of cluster IDs, only the kubeconfig files and RBAC permissions of the clusters that belong to the current user in the list are revoked.'),
  force?: boolean(name='Force', description='Specifies whether to forcefully delete the specified kubeconfig files. Valid values:

*   false (default): checks the cluster access records within the previous seven days before deleting the kubeconfig files. The kubeconfig files are not deleted if cluster access records are found or fail to be retrieved.
*   true: forcefully deletes the kubeconfig files without checking the cluster access records.', example='false'),
}

model CleanUserPermissionsShrinkRequest {
  clusterIdsShrink?: string(name='ClusterIds', description='The cluster IDs. If you specify a list of cluster IDs, only the kubeconfig files and RBAC permissions of the clusters that belong to the current user in the list are revoked.'),
  force?: boolean(name='Force', description='Specifies whether to forcefully delete the specified kubeconfig files. Valid values:

*   false (default): checks the cluster access records within the previous seven days before deleting the kubeconfig files. The kubeconfig files are not deleted if cluster access records are found or fail to be retrieved.
*   true: forcefully deletes the kubeconfig files without checking the cluster access records.', example='false'),
}

model CleanUserPermissionsResponseBody = {
  requestId?: string(name='request_id', description='The request ID.', example='687C5BAA-D103-4993-884B-C35E4314****'),
  taskId?: string(name='task_id', description='The task ID.', example='clean-user-permissions-2085266204********-6694c16e6ae07***********'),
}

model CleanUserPermissionsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CleanUserPermissionsResponseBody(name='body'),
}

/**
 * @summary You can call the CleanUserPermissions operation to delete the kubeconfig files of the specified users and revoke the relevant Role-Based Access Control (RBAC) permissions. This API operation is suitable for scenarios where employees have resigned or the accounts of employees are locked.
 *
 * @description > - To call this operation, make sure that you have the AliyunCSFullAccess permission.
 * > - You cannot revoke the permissions of an Alibaba Cloud account.
 * > - You cannot revoke the permissions of the account that you use to call this operation.
 *
 * @param tmpReq CleanUserPermissionsRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return CleanUserPermissionsResponse
 */
async function cleanUserPermissionsWithOptions(Uid: string, tmpReq: CleanUserPermissionsRequest, headers: map[string]string, runtime: Util.RuntimeOptions): CleanUserPermissionsResponse {
  Util.validateModel(tmpReq);
  var request = new CleanUserPermissionsShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.clusterIds)) {
    request.clusterIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.clusterIds, 'ClusterIds', 'simple');
  }
  var query : map[string]any = {};
  if (!Util.isUnset(request.clusterIdsShrink)) {
    query['ClusterIds'] = request.clusterIdsShrink;
  }
  if (!Util.isUnset(request.force)) {
    query['Force'] = request.force;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CleanUserPermissions',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/users/${OpenApiUtil.getEncodeParam(Uid)}/permissions`,
    method = 'DELETE',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary You can call the CleanUserPermissions operation to delete the kubeconfig files of the specified users and revoke the relevant Role-Based Access Control (RBAC) permissions. This API operation is suitable for scenarios where employees have resigned or the accounts of employees are locked.
 *
 * @description > - To call this operation, make sure that you have the AliyunCSFullAccess permission.
 * > - You cannot revoke the permissions of an Alibaba Cloud account.
 * > - You cannot revoke the permissions of the account that you use to call this operation.
 *
 * @param request CleanUserPermissionsRequest
 * @return CleanUserPermissionsResponse
 */
async function cleanUserPermissions(Uid: string, request: CleanUserPermissionsRequest): CleanUserPermissionsResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return cleanUserPermissionsWithOptions(Uid, request, headers, runtime);
}

model CreateAutoscalingConfigRequest {
  coolDownDuration?: string(name='cool_down_duration', description='The waiting time before the auto scaling feature performs a scale-in activity. It is an interval between the time when the scale-in threshold is reached and the time when the scale-in activity (reducing the number of pods) starts. Unit: minutes. Default value: 10.', example='10 m'),
  daemonsetEvictionForNodes?: boolean(name='daemonset_eviction_for_nodes', description='Specifies whether to evict pods created by DaemonSets when the cluster autoscaler performs a scale-in activity. Valid values:

*   `true`: evicts DaemonSet pods.
*   `false`: does not evict DaemonSet pods.', example='false'),
  expander?: string(name='expander', description='The node pool scale-out policy. Valid values:

*   `least-waste`: the default policy. If multiple node pools meet the requirement, this policy selects the node pool that will have the least idle resources after the scale-out activity is completed.
*   `random`: the random policy. If multiple node pools meet the requirement, this policy selects a random node pool for the scale-out activity.
*   `priority`: the priority-based policy If multiple node pools meet the requirement, this policy selects the node pool with the highest priority for the scale-out activity. The priority setting is stored in the ConfigMap named `cluster-autoscaler-priority-expander` in the kube-system namespace. When a scale-out activity is triggered, the policy obtains the node pool priorities from the ConfigMap based on the node pool IDs and then selects the node pool with the highest priority for the scale-out activity.', example='least-waste'),
  gpuUtilizationThreshold?: string(name='gpu_utilization_threshold', description='The scale-in threshold of GPU utilization. This threshold specifies the ratio of the GPU resources that are requested by pods to the total GPU resources on the node.

A scale-in activity is performed only when the CPU utilization, memory utilization, and GPU utilization of a GPU-accelerated node are lower than the scale-in threshold of GPU utilization.', example='0.5'),
  maxGracefulTerminationSec?: int32(name='max_graceful_termination_sec', description='The maximum amount of time to wait for pods on a node to terminate during a scale-in activity. Unit: seconds.', example='14400s'),
  minReplicaCount?: int32(name='min_replica_count', description='The minimum number of pods allowed in each ReplicaSet before a scale-in activity is performed.', example='0'),
  priorities?: map[string][ string ](name='priorities', description='Auto-scaling priority configuration. After creating a node pool with elasticity enabled, you can choose whether to configure a priority strategy and priority settings through [Enabling Node Auto-scaling](https://help.aliyun.com/document_detail/119099.html). This allows you to set priorities for the specified auto-scaling node pool scaling group. The priority value range is [1, 100] and must be a positive integer.'),
  recycleNodeDeletionEnabled?: boolean(name='recycle_node_deletion_enabled', description='Specifies whether to delete the corresponding Kubernetes node objects after nodes are removed in swift mode. For more information about the swift mode, see [Scaling mode](https://help.aliyun.com/document_detail/119099.html). Default value: false Valid values:

*   `true`: deletes the corresponding Kubernetes node objects after nodes are removed in swift mode. We recommend that you do not set the value to true because data inconsistency may occur in Kubernetes objects.
*   `false`: retains the corresponding Kubernetes node objects after nodes are removed in swift mode.', example='false'),
  scaleDownEnabled?: boolean(name='scale_down_enabled', description='Specifies whether to allow node scale-in activities. Valid values:

*   `true`: allows node scale-in activities.
*   `false`: does not allow node scale-in activities.', example='true'),
  scaleUpFromZero?: boolean(name='scale_up_from_zero', description='Specifies whether the cluster autoscaler performs a scale-out activity when the number of ready nodes in the cluster is 0. Default value: true. Valid values:

*   `true`: performs a scale-out activity.
*   `false`: does not perform a scale-out activity.', example='true'),
  scalerType?: string(name='scaler_type', description='Elastic component type, default is goatscaler for cluster version 1.24 and above, and cluster-autoscaler below that. Values:

- `goatscaler`: Instant elasticity. 
- `cluster-autoscaler`: Auto-scaling.', example='goatscaler'),
  scanInterval?: string(name='scan_interval', description='The interval at which the system scans for events that trigger scaling activities. Unit: seconds. Default value: 60.', example='30s'),
  skipNodesWithLocalStorage?: boolean(name='skip_nodes_with_local_storage', description='Specifies whether the cluster autoscaler scales in nodes that host pods mounted with local volumes, such as EmptyDir or HostPath volumes. Valid values:

*   `true`: does not allow the cluster autoscaler to scale in these nodes.
*   `false`: allows the cluster autoscaler to scale in these nodes.', example='false'),
  skipNodesWithSystemPods?: boolean(name='skip_nodes_with_system_pods', description='Specifies whether the cluster autoscaler scales in nodes that host pods in the kube-system namespace. This parameter does not take effect on pods created by DaemonSets and mirror pods. Valid values:

*   `true`: does not allow the cluster autoscaler to scale in these nodes.
*   `false`: allows the cluster autoscaler to scale in these nodes.', example='true'),
  unneededDuration?: string(name='unneeded_duration', description='The cooldown period. After the autoscaler performs a scale-out activity, the autoscaler waits a cooldown period before it can perform a scale-in activity. Newly added nodes can be removed in scale-in activities only after the cooldown period ends. Unit: minutes.', example='10 m'),
  utilizationThreshold?: string(name='utilization_threshold', description='The scale-in threshold. This threshold specifies the ratio of the resources that are requested by pods to the total resources on the node.

A scale-in activity is performed only when the CPU utilization and memory utilization of a node are lower than the scale-in threshold.', example='0.5'),
}

model CreateAutoscalingConfigResponseBody = {
  clusterId?: string(name='cluster_id', description='The cluster ID.', example='cc212d04dfe184547bffaa596********'),
  requestId?: string(name='request_id', description='The request ID.', example='AF8BE105-C32B-1269-9774-5510********'),
  taskId?: string(name='task_id', description='The task ID.', example='T-5fd211e924e1d007********'),
}

model CreateAutoscalingConfigResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateAutoscalingConfigResponseBody(name='body'),
}

/**
 * @summary Creates a scaling configuration to allow the system to scale resources based on the given scaling rules. When you create a scaling configuration, you can specify the scaling metrics, thresholds, scaling order, and scaling interval.
 *
 * @param request CreateAutoscalingConfigRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateAutoscalingConfigResponse
 */
async function createAutoscalingConfigWithOptions(ClusterId: string, request: CreateAutoscalingConfigRequest, headers: map[string]string, runtime: Util.RuntimeOptions): CreateAutoscalingConfigResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.coolDownDuration)) {
    body['cool_down_duration'] = request.coolDownDuration;
  }
  if (!Util.isUnset(request.daemonsetEvictionForNodes)) {
    body['daemonset_eviction_for_nodes'] = request.daemonsetEvictionForNodes;
  }
  if (!Util.isUnset(request.expander)) {
    body['expander'] = request.expander;
  }
  if (!Util.isUnset(request.gpuUtilizationThreshold)) {
    body['gpu_utilization_threshold'] = request.gpuUtilizationThreshold;
  }
  if (!Util.isUnset(request.maxGracefulTerminationSec)) {
    body['max_graceful_termination_sec'] = request.maxGracefulTerminationSec;
  }
  if (!Util.isUnset(request.minReplicaCount)) {
    body['min_replica_count'] = request.minReplicaCount;
  }
  if (!Util.isUnset(request.priorities)) {
    body['priorities'] = request.priorities;
  }
  if (!Util.isUnset(request.recycleNodeDeletionEnabled)) {
    body['recycle_node_deletion_enabled'] = request.recycleNodeDeletionEnabled;
  }
  if (!Util.isUnset(request.scaleDownEnabled)) {
    body['scale_down_enabled'] = request.scaleDownEnabled;
  }
  if (!Util.isUnset(request.scaleUpFromZero)) {
    body['scale_up_from_zero'] = request.scaleUpFromZero;
  }
  if (!Util.isUnset(request.scalerType)) {
    body['scaler_type'] = request.scalerType;
  }
  if (!Util.isUnset(request.scanInterval)) {
    body['scan_interval'] = request.scanInterval;
  }
  if (!Util.isUnset(request.skipNodesWithLocalStorage)) {
    body['skip_nodes_with_local_storage'] = request.skipNodesWithLocalStorage;
  }
  if (!Util.isUnset(request.skipNodesWithSystemPods)) {
    body['skip_nodes_with_system_pods'] = request.skipNodesWithSystemPods;
  }
  if (!Util.isUnset(request.unneededDuration)) {
    body['unneeded_duration'] = request.unneededDuration;
  }
  if (!Util.isUnset(request.utilizationThreshold)) {
    body['utilization_threshold'] = request.utilizationThreshold;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateAutoscalingConfig',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/cluster/${OpenApiUtil.getEncodeParam(ClusterId)}/autoscale/config/`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Creates a scaling configuration to allow the system to scale resources based on the given scaling rules. When you create a scaling configuration, you can specify the scaling metrics, thresholds, scaling order, and scaling interval.
 *
 * @param request CreateAutoscalingConfigRequest
 * @return CreateAutoscalingConfigResponse
 */
async function createAutoscalingConfig(ClusterId: string, request: CreateAutoscalingConfigRequest): CreateAutoscalingConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return createAutoscalingConfigWithOptions(ClusterId, request, headers, runtime);
}

model CreateClusterRequest {
  accessControlList?: [ string ](name='access_control_list', description='The network access control list (ACL) rule of the SLB instance associated with the API server if the cluster is a registered cluster.'),
  addons?: [
    Addon
  ](name='addons', description='The components that you want to install in the cluster. When you create a cluster, you can configure the `addons` parameter to specify the components that you want to install.

**Network plug-in**: required. The Flannel and Terway plug-ins are supported. Select one of the plug-ins for the cluster.

*   If you want to use the Terway component, specify the network plug-in in the [{"name":"flannel","config":""}] format.
*   If you want to use the Terway component, specify the value network plug-in in the [{"name": "terway-eniip","Config": ""}] format.

**Volume plug-in**: optional. Only the `Container Storage Interface (CSI)` plug-in is supported.

Specify the `CSI` plug-in in the following format: [{"name":"csi-plugin","config": ""},{"name": "csi-provisioner","config": ""}].

**Simple Log Service component**: optional. We recommend that you enable Simple Log Service. If Simple Log Service is disabled, you cannot use the cluster auditing feature.

*   Specify an existing `Simple Log Service project` in the following format: [{"name": "logtail-ds","config": "{"IngressDashboardEnabled":"true","sls_project_name":"your_sls_project_name"}"}].
*   To create a `Simple Log Service project`, specify the component in the following format: [{"name": "logtail-ds","config": "{"IngressDashboardEnabled":"true"}"}].

**Ingress controller**: optional. By default, the `nginx-ingress-controller` component is installed in ACK dedicated clusters.

*   To install nginx-ingress-controller and enable Internet access, specify the Ingress controller in the following format: [{"name":"nginx-ingress-controller","config":"{"IngressSlbNetworkType":"internet"}"}].
*   To disable the automatic installation of nginx-ingress-controller, specify the Ingress controller in the following format: [{"name": "nginx-ingress-controller","config": "","disabled": true}].

**Event center**: optional. By default, the event center feature is enabled.

You can use ACK event centers to store and query events and configure alerts. You can use the Logstores that are associated with ACK event centers free of charge within 90 days. For more information, see [Create and use an event center](https://help.aliyun.com/document_detail/150476.html).

To enable the event center feature, specify the event center component in the following format: [{"name":"ack-node-problem-detector","config":"{"sls_project_name":"your_sls_project_name"}"}].'),
  apiAudiences?: string(name='api_audiences', description='Service accounts provide identities for pods when pods communicate with the `API server` of the cluster. The `api-audiences` parameter validates `tokens` and is used by the `API server` to check whether the `tokens` of requests are valid. Separate multiple values with commas (,).``

For more information about `service accounts`, see [Enable service account token volume projection](https://help.aliyun.com/document_detail/160384.html).', example='kubernetes.default.svc'),
  autoRenew?: boolean(name='auto_renew', description='[**Deprecated**]

Specifies whether to enable auto-renewal. This parameter takes effect only when `charge_type` is set to `PrePaid`. Valid values:

*   `true`: enables auto-renewal.
*   `false`: disables auto-renewal.

Default value: `false`.

This parameter was changed on October 15, 2024. For more information, see [Announcement on changes to the parameter behavior of the CreateCluster operation](https://help.aliyun.com/document_detail/2849194.html).', example='true', deprecated=true),
  autoRenewPeriod?: long(name='auto_renew_period', description='[**Deprecated**]

The auto-renewal duration. This parameter takes effect only if charge_type is set to PrePaid and auto_renew is set to true. If you set `period_unit` to Month, the valid values of auto_renew_period are 1, 2, 3, 6, and 12.

Default value: 1.

This parameter was changed on October 15, 2024. For more information, see [Announcement on changes to the parameter behavior of the CreateCluster operation](https://help.aliyun.com/document_detail/2849194.html).', example='1', deprecated=true),
  chargeType?: string(name='charge_type', description='[**Deprecated**]

The billing method of the CLB instance that is used by the API server. Default value: PostPaid. Valid values:

*   PostPaid: pay-as-you-go.
*   PrePaid: subscription. This billing method is not supported by newly created CLB instances. Existing CLB instances are not affected.

> 

*   This parameter was changed on October 15, 2024. For more information, see [Announcement on changes to the parameter behavior of the CreateCluster operation](https://help.aliyun.com/document_detail/2849194.html).

*   Starting from December 1, 2024, newly created CLB instances no longer support the subscription billing method, and an instance fee will be charged for newly created CLB instances

For more information, see [CLB billing adjustments](https://help.aliyun.com/document_detail/2839797.html).', example='1', deprecated=true),
  cisEnabled?: boolean(name='cis_enabled', description='[Deprecated] When you configure the control plane, use the `security_hardening_os` parameter in the `control_plane_config` section instead. When you configure a node pool, use the `security_hardening_os` parameter of the `scaling_group` field in the `nodepool` section instead.', example='false', deprecated=true),
  cloudMonitorFlags?: boolean(name='cloud_monitor_flags', description='[**Deprecated**] When you configure the control plane, use the `cloud_monitor_flags` parameter in the `control_plane_config` section instead. When you configure a node pool, use the `cms_enabled` parameter of the `kubernetes_config` field in the nodepool section instead.

Specifies whether to install the CloudMonitor agent. Valid values:

*   `true`: installs the CloudMonitor agent.
*   `false`: does not install the CloudMonitor agent.

Default value: `false`.', example='true', deprecated=true),
  clusterDomain?: string(name='cluster_domain', description='The domain name of the cluster.

The domain name can contain one or more parts that are separated by periods (.). Each part cannot exceed 63 characters in length, and can contain lowercase letters, digits, and hyphens (-). Each part must start and end with a lowercase letter or digit.', example='cluster.local'),
  clusterSpec?: string(name='cluster_spec', description='If you set `cluster_type` to `ManagedKubernetes` and specify `profile`, you can further specify the edition of the cluster. Valid values:

*   `ack.pro.small`: Pro Edition.
*   `ack.standard`: Basic Edition. If you leave the parameter empty, an ACK Basic cluster is created.', example='ack.pro.small'),
  clusterType?: string(name='cluster_type', description='*   `Kubernetes`: ACK dedicated cluster.
*   `ManagedKubernetes`: ACK managed cluster. ACK managed clusters include ACK Basic clusters, ACK Pro clusters, ACK Serverless clusters (Basic Edition and Pro Edition), ACK Edge clusters (Basic Edition and Pro Edition), and ACK Lingjun clusters (Pro Edition).
*   `ExternalKubernetes`: registered cluster.

This parameter is required.', example='Kubernetes'),
  containerCidr?: string(name='container_cidr', description='The pod CIDR block. You can specify 10.0.0.0/8, 172.16-31.0.0/12-16, 192.168.0.0/16, or their subnets as the pod CIDR block. The pod CIDR block cannot overlap with the CIDR block of the VPC in which the cluster is deployed and the CIDR blocks of existing clusters in the VPC. You cannot modify the pod CIDR block after you create the cluster.

For more information about how to plan the network of an ACK cluster, see [Plan the network of an ACK cluster](https://help.aliyun.com/document_detail/86500.html).

>  This parameter is required if the cluster uses the Flannel plug-in.', example='172.20.0.0/16'),
  controlPlaneConfig?: {
    autoRenew?: boolean(name='auto_renew', description='Specifies whether to enable auto-renewal for the node.', example='true'),
    autoRenewPeriod?: long(name='auto_renew_period', description='The auto-renewal duration for the node.', example='1'),
    chargeType?: string(name='charge_type', description='The billing method of the node.', example='PrePaid'),
    cloudMonitorFlags?: boolean(name='cloud_monitor_flags', description='Specifies whether to install CloudMonitor on the node.', example='true'),
    cpuPolicy?: string(name='cpu_policy', description='The CPU management policy of the node.', example='none'),
    deploymentsetId?: string(name='deploymentset_id', description='The ID of the deployment set.', example='ds-bp10b35imuam5amw****'),
    imageId?: string(name='image_id', description='The image ID.', example='aliyun_3_x64_20G_alibase_20240819.vhd'),
    imageType?: string(name='image_type', description='The type of the OS image.', example='AliyunLinux3'),
    instanceTypes?: [ string ](name='instance_types', description='The instance types of the nodes.'),
    keyPair?: string(name='key_pair', description='The name of the key pair. You must set this parameter or login_password.', example='ack'),
    loginPassword?: string(name='login_password', description='The SSH logon password. The password must be 8 to 30 characters in length and contain a minimum of three of the following character types: uppercase letters, lowercase letters, digits, and special characters. You must set this parameter or key_pair.', example='ack@Test'),
    nodePortRange?: string(name='node_port_range', description='The node port range.', example='30000-32767'),
    period?: long(name='period', description='The subscription duration of the node.', example='1'),
    periodUnit?: string(name='period_unit', description='The unit of the subscription duration of the node.', example='Month'),
    runtime?: string(name='runtime', description='The container runtime.', example='containerd'),
    securityHardeningOs?: boolean(name='security_hardening_os', description='Specifies whether to enable Alibaba Cloud Linux Security Hardening.', example='true'),
    size?: long(name='size', description='The number of control plane nodes.', example='3'),
    socEnabled?: boolean(name='soc_enabled', description='Specifies whether to enable MLPS security hardening.', example='true'),
    systemDiskBurstingEnabled?: boolean(name='system_disk_bursting_enabled', description='Specifies whether to enable the burst feature for the system disk.', example='true'),
    systemDiskCategory?: string(name='system_disk_category', description='The system disk category for the node.', example='cloud_essd'),
    systemDiskPerformanceLevel?: string(name='system_disk_performance_level', description='The PL of the system disk that you want to use for the node. This parameter takes effect only for ESSDs.', example='PL1'),
    systemDiskProvisionedIops?: long(name='system_disk_provisioned_iops', description='The preset read/write IOPS of the system disk.', example='1000'),
    systemDiskSize?: long(name='system_disk_size', description='The system disk size of the node. The value must be at least 40 GB.', example='120'),
    systemDiskSnapshotPolicyId?: string(name='system_disk_snapshot_policy_id', description='The automatic snapshot policy of the node.', example='sp-2zej1nogjvovnz4z****'),
  }(name='control_plane_config', description='The control plane configurations of an ACK dedicated cluster.'),
  controlplaneLogComponents?: [ string ](name='controlplane_log_components', description='The control plane components for which you want to enable log collection.

By default, the logs of kube-apiserver, kube-controller-manager, and kube-scheduler are collected.'),
  controlplaneLogProject?: string(name='controlplane_log_project', description='The Simple Log Service project that is used to store the logs of control plane components. You can use an existing project or create one. If you choose to create a Simple Log Service project, the created project is named in the `k8s-log-{ClusterID}` format.', example='k8s-log-xxx'),
  controlplaneLogTtl?: string(name='controlplane_log_ttl', description='The retention period of control plane logs in days.', example='30'),
  cpuPolicy?: string(name='cpu_policy', description='[**Deprecated**] When you configure the control plane, use the `cpu_policy` parameter in the `control_plane_config` section instead. When you configure a node pool, use the `cpu_policy` parameter of the `kubernetes_config` field in the `nodepool` section instead.

The CPU management policy of the node. The following policies are supported if the Kubernetes version of the cluster is 1.12.6 or later:

*   `static`: allows pods with specific resource characteristics on the node to be granted enhanced CPU affinity and exclusivity.
*   `none`: specifies that the default CPU affinity is used.

Default value: `none`.', example='none', deprecated=true),
  customSan?: string(name='custom_san', description='The custom subject alternative names (SANs) for the API server certificate to accept requests from specified IP addresses or domain names. Separate multiple IP addresses and domain names with commas (,).', example='cs.aliyun.com'),
  deletionProtection?: boolean(name='deletion_protection', description='Specifies whether to enable cluster deletion protection. If you enable this option, the cluster cannot be deleted in the console or by calling API operations. Valid values:

*   `true`: enables cluster deletion protection.
*   `false`: disables cluster deletion protection.

Default value: `false`.', example='true'),
  disableRollback?: boolean(name='disable_rollback', description='[**Deprecated**] By default, the system does not perform a rollback when the cluster fails to be created. You must manually delete the cluster that fails to be created.

Specifies whether to perform a rollback when the cluster fails to be created. Valid values:

*   `true`: performs a rollback when the cluster fails to be created.
*   `false`: does not perform a rollback when the cluster fails to be created.

Default value: `true`.', example='true', deprecated=true),
  enableRrsa?: boolean(name='enable_rrsa', description='Specifies whether to enable the RAM Roles for Service Accounts (RRSA) feature.', example='true'),
  encryptionProviderKey?: string(name='encryption_provider_key', description='The ID of the Key Management Service (KMS) key that is used to encrypt the system disk. For more information, see [What is KMS?](https://help.aliyun.com/document_detail/28935.html)

>  The key can be used only in ACK Pro clusters.', example='0fe64791-55eb-4fc7-84c5-c6c7cdca****'),
  endpointPublicAccess?: boolean(name='endpoint_public_access', description='Specifies whether to enable Internet access for the cluster. You can use an elastic IP address (EIP) to expose the API server. This way, you can access the cluster over the Internet. Valid values:

*   `true`: enables Internet access for the cluster.
*   `false`: disables Internet access for the cluster. If you set the value to false, the API server cannot be accessed over the Internet.

Default value: `false`.', example='true'),
  formatDisk?: boolean(name='format_disk', description='[**Deprecated**] When you configure a node pool, you cannot add existing nodes to the cluster. If you want to add existing nodes, you must first create a node pool and then call the [AttachInstancesToNodePool](https://help.aliyun.com/document_detail/2667920.html) operation.

Specifies whether to mount a data disk to a node that is created based on an existing ECS instance. Valid values:

*   `true`: stores the data of containers and images on a data disk. The existing data stored in the data disk is lost. Back up the existing data first.
*   `false`: does not store the data of containers and images on a data disk.

Default value: `false`.

How data disks are mounted:

*   If an ECS instance has data disks mounted and the file system of the last data disk is not initialized, the system automatically formats the data disk to ext4. Then, the system mounts the data disk to /var/lib/docker and /var/lib/kubelet.
*   If no data disk is mounted to the ECS instance, the system does not purchase a new data disk.', example='false', deprecated=true),
  imageId?: string(name='image_id', description='[**Deprecated**] When you configure the control plane, use the `image_id` parameter in the `control_plane_config` section instead. When you configure a node pool, use the `image_id` parameter of the `scaling_group` field in the `nodepool` section instead.

The custom image for nodes. By default, the image provided by ACK is used. You can select a custom image to replace the default image. For more information, see [Use a custom image to create an ACK cluster](https://help.aliyun.com/document_detail/146647.html).', example='m-bp16z7xko3vvv8gt****', deprecated=true),
  imageType?: string(name='image_type', description='[**Deprecated**] When you configure the control plane, use the `image_type` parameter in the `control_plane_config` section instead. When you configure a node pool, use the `image_type` parameter of the `scaling_group` field in the `nodepool` section instead.

The type of OS distribution that you want to use. To specify the node OS, we recommend that you use this parameter. Valid values:

*   CentOS
*   AliyunLinux
*   AliyunLinux Qboot
*   AliyunLinuxUEFI
*   AliyunLinux3
*   Windows
*   WindowsCore
*   AliyunLinux3Arm64
*   ContainerOS

Default value: `CentOS`.', example='AliyunLinux', deprecated=true),
  instances?: [ string ](name='instances', description='[**Deprecated**] When you configure a node pool, you cannot add existing nodes to the cluster. If you want to add existing nodes, you must first create a node pool and then call the [AttachInstancesToNodePool](https://help.aliyun.com/document_detail/2667920.html) operation.

The existing ECS instances that are specified as worker nodes for the cluster.

>  This parameter is required if you create worker nodes on existing ECS instances.', deprecated=true),
  ipStack?: string(name='ip_stack', description='The IP stack of the cluster.', example='Optional value: ipv4 (Single stack) or ipv6 (Dual Stack)
Default value: IPV4'),
  isEnterpriseSecurityGroup?: boolean(name='is_enterprise_security_group', description='Specifies whether to create an advanced security group. This parameter takes effect only if `security_group_id` is left empty.

>  To use a basic security group, make sure that the sum of the number of nodes in the cluster and the number of pods that use Terway does not exceed 2,000. Therefore, we recommend that you specify an advanced security group for a cluster that uses Terway.

*   `true`: creates an advanced security group.
*   `false`: does not create an advanced security group.

Default value: `true`.', example='true'),
  keepInstanceName?: boolean(name='keep_instance_name', description='[**Deprecated**] When you configure a node pool, you cannot add existing nodes to the cluster. If you want to add existing nodes, you must first create a node pool and then call the [AttachInstancesToNodePool](https://help.aliyun.com/document_detail/2667920.html) operation.

Specifies whether to retain the names of existing ECS instances that are used in the cluster. Valid values:

*   `true`: retains the names.
*   `false`: does not retain the names. The system assigns new names.

Default value: `true`.', example='true', deprecated=true),
  keyPair?: string(name='key_pair', description='[**Deprecated**] When you configure the control plane, use the `key_pair` parameter in the `control_plane_config` section instead. When you configure a node pool, use the `key_pair` parameter of the `scaling_group` field in the `nodepool` section instead.

The name of the key pair. You must configure this parameter or `login_password`.', example='secrity-key', deprecated=true),
  kubernetesVersion?: string(name='kubernetes_version', description='The Kubernetes version of the cluster. The Kubernetes versions supported by ACK are the same as the Kubernetes versions supported by open source Kubernetes. We recommend that you specify the latest Kubernetes version. If you do not specify this parameter, the latest Kubernetes version is used.

You can create ACK clusters of the latest three Kubernetes versions in the ACK console. If you want to create clusters that run earlier Kubernetes versions, use the ACK API. For more information about the Kubernetes versions supported by ACK, see [Support for Kubernetes versions](https://help.aliyun.com/document_detail/185269.html).', example='1.16.9-aliyun.1'),
  loadBalancerId?: string(name='load_balancer_id', description='Specifies the ID of the CLB instance for accessing the API server. If this parameter is specified, the system does not automatically create a CLB instance for the API server.

>  Make sure that the CLB instance does not have other dependencies, such as listeners and backend servers. You cannot specify shared-resource or Internet-facing CLB instances.', example='lb-wz9t256gqa3vbouk****'),
  loadBalancerSpec?: string(name='load_balancer_spec', description='[**Deprecated**] The pay-as-you-go billing method is used by Classic Load Balancer (CLB) instances. This parameter does not take effect.

The specification of the Server Load Balancer (SLB) instance. Valid values:

*   slb.s1.small
*   slb.s2.small
*   slb.s2.medium
*   slb.s3.small
*   slb.s3.medium
*   slb.s3.large

Default value: `slb.s2.small`.', example='slb.s2.small', deprecated=true),
  loggingType?: string(name='logging_type', description='Enables Simple Log Service for the cluster. This parameter takes effect only for ACK Serverless clusters. Set the value to `SLS`.', example='SLS'),
  loginPassword?: string(name='login_password', description='[**Deprecated**] When you configure the control plane, use the `login_password` parameter in the `control_plane_config` section instead. When you configure a node pool, use the `login_password` parameter of the `scaling_group` field in the `nodepool` section instead.

The password for SSH logon. You must set this parameter or `key_pair`. The password must be 8 to 30 characters in length, and must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters.', example='Hello@1234', deprecated=true),
  maintenanceWindow?: MaintenanceWindow(name='maintenance_window', description='The configurations of the cluster maintenance window.'),
  masterAutoRenew?: boolean(name='master_auto_renew', description='[**Deprecated**] When you configure the control plane, use the `auto-renew` parameter in the `control_plane_config` section instead.

Specifies whether to enable auto-renewal for master nodes. This parameter takes effect only when `master_instance_charge_type` is set to `PrePaid`. Valid values:

*   `true`: enables auto-renewal.
*   `false`: disables auto-renewal.

Default value: `true`.', example='true', deprecated=true),
  masterAutoRenewPeriod?: long(name='master_auto_renew_period', description='[**Deprecated**] When you configure the control plane, use the `auto-renew_period` parameter in the `control_plane_config` section instead.

The auto-renewal duration. This parameter takes effect and is required only when the subscription billing method is selected for master nodes.

Valid values: 1, 2, 3, 6, and 12.

Default value: 1.', example='1', deprecated=true),
  masterCount?: long(name='master_count', description='[**Deprecated**] When you configure the control plane, use the `size` parameter in the `control_plane_config` section instead.

The number of master nodes. Valid values: `3` and `5`.

Default value: `3`.', example='3', deprecated=true),
  masterInstanceChargeType?: string(name='master_instance_charge_type', description='[**Deprecated**] When you configure the control plane, use the `instance_charge_type` parameter in the `control_plane_config` section instead.

The billing method of master nodes. Valid values:

*   `PrePaid`: subscription.
*   `PostPaid`: pay-as-you-go.

Default value: `PostPaid`.', example='PrePaid', deprecated=true),
  masterInstanceTypes?: [ string ](name='master_instance_types', description='[**Deprecated**] When you configure the control plane, use the `instance_types` parameter in the `control_plane_config` section instead.

The instance types of master nodes. For more information, see [Overview of instance families](https://help.aliyun.com/document_detail/25378.html).', deprecated=true),
  masterPeriod?: long(name='master_period', description='[**Deprecated**] When you configure the control plane, use the `unit` parameter in the `control_plane_config` section instead.

The subscription duration of master nodes. This parameter takes effect and is required only when `master_instance_charge_type` is set to `PrePaid`.

Valid values: 1, 2, 3, 6, 12, 24, 36, 48, and 60.

Default value: 1.', example='1', deprecated=true),
  masterPeriodUnit?: string(name='master_period_unit', description='[**Deprecated**] When you configure the control plane, use the `period_unit` parameter in the `control_plane_config` section instead.

The billing cycle of the master nodes in the cluster. This parameter is required if master_instance_charge_type is set to `PrePaid`.

Valid value: `Month`, which indicates that master nodes are billed only on a monthly basis.', example='Month', deprecated=true),
  masterSystemDiskCategory?: string(name='master_system_disk_category', description='[**Deprecated**] When you configure the control plane, use the `system_disk_category` parameter in the `control_plane_config` section instead.

The system disk category of master nodes. Valid values:

*   `cloud_efficiency`: ultra disk.
*   `cloud_ssd`: standard SSD.
*   `cloud_essd`: Enterprise SSD (ESSD).

Default value: `cloud_ssd`. The default value may vary in different zones.', example='cloud_ssd', deprecated=true),
  masterSystemDiskPerformanceLevel?: string(name='master_system_disk_performance_level', description='[**Deprecated**] When you configure the control plane, use the `system_disk_performance_level` parameter in the `control_plane_config` section instead.

The performance level (PL) of the system disk that you want to use for master nodes. This parameter takes effect only for ESSDs. For more information about the relationship between disk PLs and disk sizes, see [ESSDs](https://help.aliyun.com/document_detail/122389.html).', example='PL1', deprecated=true),
  masterSystemDiskSize?: long(name='master_system_disk_size', description='[**Deprecated**] When you configure the control plane, use the `system_disk_disk` parameter in the `control_plane_config` section instead.

The system disk size of master nodes. Valid values: 40 to 500. Unit: GiB.

Default value: `120`.', example='120', deprecated=true),
  masterSystemDiskSnapshotPolicyId?: string(name='master_system_disk_snapshot_policy_id', description='[**Deprecated**] When you configure the control plane, use the `system_disk_snapshot_policy_id` parameter in the `control_plane_config` section instead.

The ID of the automatic snapshot policy that is used by the system disk specified for master nodes.', example='sp-2zej1nogjvovnz4z****', deprecated=true),
  masterVswitchIds?: [ string ](name='master_vswitch_ids', description='[**Deprecated**] Use the `vswitch_ids` parameter instead.

The IDs of the vSwitches that are specified for master nodes. You can specify up to three vSwitches. We recommend that you specify three vSwitches in different zones to ensure high availability.

The number of vSwitches must be the same as the value of the `master_count` parameter and also the same as the number of vSwitches specified in the `master_vswitch_ids` parameter.', deprecated=true),
  name?: string(name='name', description='The cluster name.

The name must be 1 to 63 characters in length, and can contain digits, letters, and hyphens (-). The name cannot start with a hyphen (-).

This parameter is required.', example='cluster-demo'),
  natGateway?: boolean(name='nat_gateway', description='[Deprecated] Use the `snat_entry` parameter instead.', example='true'),
  nodeCidrMask?: string(name='node_cidr_mask', description='The maximum number of IP addresses that can be assigned to each node. This number is determined by the subnet mask of the specified CIDR block. This parameter takes effect only if the cluster uses the Flannel plug-in.

Default value: `26`.', example='25'),
  nodeNameMode?: string(name='node_name_mode', description='[**Deprecated**] When you configure a node pool, use the `node_name_mode` parameter of the `kubernetes_config` field in the `nodepool` section instead.

The custom node name.

A custom node name consists of a prefix, a node IP address, and a suffix.

*   The prefix and suffix can contain multiple parts that are separated by periods (.). Each part can contain lowercase letters, digits, and hyphens (-), and must start and end with a lowercase letter or digit.
*   The IP substring length specifies the number of digits to be truncated from the end of the node IP address. The IP substring length ranges from 5 to 12.

For example, if the node IP address is 192.168.0.55, the prefix is aliyun.com, the IP substring length is 5, and the suffix is test, the node name will aliyun.com00055test.', example='aliyun.com00055test', deprecated=true),
  nodePortRange?: string(name='node_port_range', description='The node port range. Valid values: 30000 to 65535.

Default value: `30000-32767`.', example='30000~32767'),
  nodepools?: [
    Nodepool
  ](name='nodepools', description='The list of node pools.'),
  numOfNodes?: long(name='num_of_nodes', description='[**Deprecated**] When you configure a node pool, use the `desired_size` parameter of the `scaling_group` field in the `nodepool` section instead.

The number of worker nodes. Valid values: 0 to 100.', example='3', deprecated=true),
  operationPolicy?: {
    clusterAutoUpgrade?: {
      channel?: string(name='channel', description='The automatic update frequency. Valid values:

*   patch
*   stable
*   rapid', example='patch'),
      enabled?: boolean(name='enabled', description='Specifies whether to enable auto cluster update.', example='true'),
    }(name='cluster_auto_upgrade', description='The configurations of auto cluster upgrade.'),
  }(name='operation_policy', description='The automatic O\\\\&M policy of the cluster.'),
  osType?: string(name='os_type', description='[**Deprecated**] When you configure the control plane, use the `image_type` parameter in the `control_plane_config` section instead. When you configure a node pool, use the `image_type` parameter of the `scaling_group` field in the `nodepool` section instead.

The type of OS. Valid values:

*   Windows
*   Linux

Default value: `Linux`.', example='Linux', deprecated=true),
  period?: long(name='period', description='[**Deprecated**]

The subscription duration. This parameter takes effect and is required only when you set charge_type to PrePaid.

Valid values: 1, 2, 3, 6, 12, 24, 36, 48, and 60.

Default value: 1.

This parameter was changed on October 15, 2024. For more information, see [Announcement on changes to the parameter behavior of the CreateCluster operation](https://help.aliyun.com/document_detail/2849194.html).', example='FY2023', deprecated=true),
  periodUnit?: string(name='period_unit', description='[**Deprecated**]

The billing cycle. This parameter is required if charge_type is set to PrePaid.

Valid value: Month, which indicates that resources are billed only on a monthly basis.

This parameter was changed on October 15, 2024. For more information, see [Announcement on changes to the parameter behavior of the CreateCluster operation](https://help.aliyun.com/document_detail/2849194.html).', example='Month', deprecated=true),
  platform?: string(name='platform', description='[**Deprecated**] When you configure a node pool, use the `platform` parameter of the `scaling_group` field in the `nodepool` section instead.

The OS distribution that is used. Valid values:

*   CentOS
*   AliyunLinux
*   QbootAliyunLinux
*   Qboot
*   Windows
*   WindowsCore

Default value: `CentOS`.', example='CentOS', deprecated=true),
  podVswitchIds?: [ string ](name='pod_vswitch_ids', description='If you select Terway as the network plug-in, you must allocate vSwitches to pods. For each vSwitch that allocates IP addresses to worker nodes, you must select a vSwitch in the same zone to allocate IP addresses to pods.

>  We recommend that you select pod vSwitches whose subnet masks do not exceed 19 bits in length. The maximum subnet mask length of a pod vSwitch is 25 bits. If you select a pod vSwitch whose subnet mask exceeds 25 bits in length, the IP addresses that can be allocated to pods may be insufficient.'),
  profile?: string(name='profile', description='If you set `cluster_type` to `ManagedKubernetes`, an ACK managed cluster is created. In this case, you can further specify the cluster edition. Valid values:

*   `Default`: ACK managed cluster. ACK managed clusters include ACK Basic clusters and ACK Pro clusters.
*   `Edge`: ACK Edge cluster. ACK Edge clusters include ACK Edge Basic clusters and ACK Edge Pro clusters.
*   `Serverless`: ACK Serverless cluster. ACK Serverless clusters include ACK Serverless Basic clusters and ACK Serverless Pro clusters.
*   `Lingjun`: ACK Lingjun Pro cluster.', example='Default'),
  proxyMode?: string(name='proxy_mode', description='The kube-proxy mode. Valid values:

*   `iptables`: a mature and stable mode that uses iptables rules to conduct service discovery and load balancing. The performance of this mode is limited by the size of the cluster. This mode is suitable for clusters that run a small number of Services.
*   `ipvs`: a mode that provides high performance and uses IP Virtual Server (IPVS) to conduct service discovery and load balancing. This mode is suitable for clusters that run a large number of Services. We recommend that you use this mode in scenarios that require high-performance load balancing.

Default value: `ipvs`.', example='ipvs'),
  rdsInstances?: [ string ](name='rds_instances', description='[**Deprecated**] When you configure a node pool, use the `rds_instances` parameter of the `scaling_group` field in the `nodepool` section instead.

The ApsaraDB RDS instances. The pod CIDR block and node CIDR block are added to the whitelists of the ApsaraDB RDS instances. We recommend that you add the pod CIDR block and node CIDR block to the whitelists of the ApsaraDB RDS instances in the ApsaraDB RDS console. If the RDS instances are not in the Running state, new nodes cannot be added to the cluster.', deprecated=true),
  regionId?: string(name='region_id', description='The ID of the region in which the cluster is deployed. For more information about the regions supported by ACK, see [Regions supported by ACK](https://help.aliyun.com/document_detail/216938.html).

This parameter is required.', example='cn-beijing'),
  resourceGroupId?: string(name='resource_group_id', description='The ID of the resource group to which the cluster belongs. You can use resource groups to isolate clusters.', example='rg-acfm3mkrure****'),
  runtime?: Runtime(name='runtime', description='The container runtime. The default container runtime is Docker. containerd and Sandboxed-Container are also supported.

For more information about how to select a proper container runtime, see [Comparison among Docker, containerd, and Sandboxed-Container](https://help.aliyun.com/document_detail/160313.html).'),
  securityGroupId?: string(name='security_group_id', description='The ID of an existing security group. You must specify this parameter or `is_enterprise_security_group`. Cluster nodes are automatically added to the security group.', example='sg-bp1bdue0qc1g7k****'),
  securityHardeningOs?: boolean(name='security_hardening_os', description='[**Deprecated**] When you configure the control plane, use the `security_hardening_os` parameter in the `control_plane_config` section instead. When you configure a node pool, use the `security_hardening_os` parameter of the `scaling_group` field in the `nodepool` section instead.

Specifies whether to enable Alibaba Cloud Linux Security Hardening. Valid values:

*   `true`: enables Alibaba Cloud Linux Security Hardening.
*   `false`: disables Alibaba Cloud Linux Security Hardening.

Default value: `false`.', example='false', deprecated=true),
  serviceAccountIssuer?: string(name='service_account_issuer', description='Service accounts provide identities for pods when pods communicate with the `API server` of the cluster. `service-account-issuer` specifies the issuer of the `serviceaccount token`, which is specified by using the `iss` field in the `token payload`.

For more information about `ServiceAccount`, see [Enable service account token volume projection](https://help.aliyun.com/document_detail/160384.html).', example='kubernetes.default.svc'),
  serviceCidr?: string(name='service_cidr', description='The Service CIDR block. Valid values: 10.0.0.0/16-24, 172.16-31.0.0/16-24, and 192.168.0.0/16-24. The Service CIDR block cannot overlap with the VPC CIDR block (10.1.0.0/21) or the CIDR blocks of existing clusters in the VPC. You cannot modify the Service CIDR block after the cluster is created.

By default, the Service CIDR block is set to 172.19.0.0/20.

This parameter is required.', example='172.21.0.0/20'),
  serviceDiscoveryTypes?: [ string ](name='service_discovery_types', description='The methods for implementing service discovery in `ACK Serverless` clusters.

*   `CoreDNS`: a standard service discovery plug-in that is provided by open source Kubernetes. To use DNS resolution, you must provision pods. By default, two elastic container instances are used. The specification of each instance is 0.25 vCores and 512 MiB of memory.
*   `PrivateZone`: a DNS resolution service provided by Alibaba Cloud. You must activate Alibaba Cloud DNS PrivateZone before you can use it for service discovery.

By default, this parameter is not specified.'),
  snatEntry?: boolean(name='snat_entry', description='Specifies whether to configure SNAT rules for the VPC in which your cluster is deployed. Valid values:

*   `true`: automatically creates a NAT gateway and configures SNAT rules. Set the value to `true` if nodes and applications in the cluster need to access the Internet.
*   `false`: does not create a NAT gateway or configure SNAT rules. In this case, nodes and applications in the cluster cannot access the Internet.

>  If this feature is disabled when you create the cluster, you can also manually enable this feature after you create the cluster. For more information, see [Enable an existing ACK cluster to access the Internet](https://help.aliyun.com/document_detail/178480.html).

Default value: `true`.', example='true'),
  socEnabled?: boolean(name='soc_enabled', description='[**Deprecated**] When you configure the control plane, use the `soc_enabled` parameter in the `control_plane_config` section instead. When you configure a node pool, use the `soc_enabled` parameter of the `scaling_group` field in the `nodepool` section instead.

Specifies whether to enable Multi-Level Protection Scheme (MLPS) security hardening. For more information, see [ACK security hardening based on MLPS](https://help.aliyun.com/document_detail/196148.html).

Valid values:

*   `true`: enables MLPS security hardening.
*   `false`: disables MLPS security hardening.

Default value: `false`.', example='false', deprecated=true),
  sshFlags?: boolean(name='ssh_flags', description='Specifies whether to enable SSH logon. If this parameter is set to true, you can log on to master nodes in an ACK dedicated cluster over the Internet. This parameter does not take effect for ACK managed clusters. Valid values:

*   `true`: enables SSH logon.
*   `false`: disables SSH logon.

Default value: `false`.', example='true'),
  tags?: [
    Tag
  ](name='tags', description='The labels that you want to add to nodes. You must add labels based on the following rules:

*   A label is a case-sensitive key-value pair. You can add up to 20 labels.
*   When you add a label, you must specify a unique key, but you can leave the value empty. A key cannot exceed 64 characters in length, and a value cannot exceed 128 characters in length. Keys and values cannot start with aliyun, acs:, https://, or http://. For more information, see [Labels and Selectors](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#syntax-and-character-set).'),
  taints?: [
    Taint
  ](name='taints', description='[**Deprecated**] When you configure a node pool, use the `taints` parameter of the `kubernetes_config` field in the `nodepool` section instead.

The taints that you want to add to nodes. Taints can be used together with tolerations to avoid scheduling pods to specific nodes. For more information, see [taint-and-toleration](https://kubernetes.io/zh/docs/concepts/scheduling-eviction/taint-and-toleration/).', deprecated=true),
  timeoutMins?: long(name='timeout_mins', description='[**Deprecated**] By default, the system does not perform a rollback when the cluster fails to be created. You must manually delete the cluster that fails to be created.

Specifies the timeout period of cluster creation. Unit: minutes.

Default value: `60`.', example='60', deprecated=true),
  timezone?: string(name='timezone', description='The time zone of the cluster.', example='Asia/Shanghai'),
  userCa?: string(name='user_ca', description='The custom Certificate Authority (CA) certificate used by the cluster.', example='-----BEGIN CERTIFICATE-----****'),
  userData?: string(name='user_data', description='The user data of nodes.', example='IyEvdXNyL2Jpbi9iYXNoCmVjaG8gIkhlbGxvIEFD****'),
  vpcid?: string(name='vpcid', description='The virtual private cloud (VPC) in which you want to deploy the cluster. This parameter is required.', example='vpc-2zeik9h3ahvv2zz95****'),
  vswitchIds?: [ string ](name='vswitch_ids', description='The vSwitches for nodes in the cluster. This parameter is required if you create an ACK managed cluster that does not contain nodes.'),
  workerAutoRenew?: boolean(name='worker_auto_renew', description='[**Deprecated**] When you configure a node pool, use the `auto_renew` parameter of the `scaling_group` field in the `nodepool` section instead.

Specifies whether to enable auto-renewal for worker nodes. This parameter takes effect and is required only when `worker_instance_charge_type` is set to `PrePaid`. Valid values:

*   `true`: enables auto-renewal.
*   `false`: disables auto-renewal.

Default value: `true`.', example='true', deprecated=true),
  workerAutoRenewPeriod?: long(name='worker_auto_renew_period', description='[**Deprecated**] When you configure a node pool, use the `auto_renew_period` parameter of the `scaling_group` field in the `nodepool` section instead.

The auto-renewal duration of worker nodes. This parameter takes effect and is required only if the subscription billing method is selected for worker nodes.

Valid values: 1, 2, 3, 6, and 12.', example='1', deprecated=true),
  workerDataDisks?: [ 
    {
      category?: string(name='category', description='The data disk category.

This parameter is required.', example='cloud_essd'),
      encrypted?: string(name='encrypted', description='Specifies whether to encrypt the data disk. Valid values:

*   `true`: encrypts the data disk.
*   `false`: does not encrypt the data disk.

Default value: `false`.', example='true'),
      performanceLevel?: string(name='performance_level', description='The PL of the data disk. This parameter takes effect only for ESSDs. You can specify a higher PL if you increase the size of a data disk. For more information, see [Enterprise SSDs](https://help.aliyun.com/document_detail/122389.html).', example='PL1'),
      size?: string(name='size', description='The data disk size. Valid values: 40 to 32767. Unit: GiB.

This parameter is required.', example='120'),
    }
  ](name='worker_data_disks', description='[**Deprecated**] When you configure a node pool, use the `data_disks` parameter of the `scaling_group` field in the `nodepool` section instead.

The configurations of the data disks that you want to mount to worker nodes. The configurations include the disk category and disk size.', deprecated=true),
  workerInstanceChargeType?: string(name='worker_instance_charge_type', description='[**Deprecated**] When you configure a node pool, use the `instance_charge_type` parameter of the `scaling_group` field in the `nodepool` section instead.

The billing method of worker nodes. Valid values:

*   `PrePaid`: subscription.
*   `PostPaid`: pay-as-you-go.

Default value: PostPaid.', example='PrePaid', deprecated=true),
  workerInstanceTypes?: [ string ](name='worker_instance_types', description='[**Deprecated**] When you configure a node pool, use the `instance_types` parameter of the `scaling_group` field in the `nodepool` section instead.

The instance configurations of worker nodes.', deprecated=true),
  workerPeriod?: long(name='worker_period', description='[**Deprecated**] When you configure a node pool, use the `period` parameter of the `scaling_group` field in the `nodepool` section instead.

The subscription duration of worker nodes. This parameter takes effect and is required only when `worker_instance_charge_type` is set to `PrePaid`.

Valid values: 1, 2, 3, 6, 12, 24, 36, 48, and 60.

Default value: 1.', example='1', deprecated=true),
  workerPeriodUnit?: string(name='worker_period_unit', description='[**Deprecated**] When you configure a node pool, use the `period_unit` parameter of the `scaling_group` field in the `nodepool` section instead.

The billing cycle of worker nodes. This parameter is required if worker_instance_charge_type is set to `PrePaid`.

Valid value: `Month`, which indicates that worker nodes are billed only on a monthly basis.', example='Month', deprecated=true),
  workerSystemDiskCategory?: string(name='worker_system_disk_category', description='[**Deprecated**] When you configure a node pool, use the `system_disk_category` parameter of the `scaling_group` field in the `nodepool` section instead.

The system disk category of worker nodes. For more information, see [Elastic Block Storage devices](https://help.aliyun.com/document_detail/63136.html).

Valid values:

*   `cloud_efficiency`: ultra disk.
*   `cloud_ssd`: standard SSD.

Default value: `cloud_ssd`.', example='cloud_efficiency', deprecated=true),
  workerSystemDiskPerformanceLevel?: string(name='worker_system_disk_performance_level', description='[**Deprecated**] When you configure a node pool, use the `system_disk_performance_level` parameter of the `scaling_group` field in the `nodepool` section instead.

If the system disk is an ESSD, you can specify the PL of the ESSD. For more information, see [Enterprise SSDs](https://help.aliyun.com/document_detail/122389.html).

Valid values:

*   PL0
*   PL1
*   PL2
*   PL3', example='PL1', deprecated=true),
  workerSystemDiskSize?: long(name='worker_system_disk_size', description='[**Deprecated**] When you configure a node pool, use the `system_disk_size` parameter of the `scaling_group` field in the `nodepool` section instead.

The system disk size of worker nodes. Unit: GiB.

Valid values: 40 to 500.

The value of this parameter must be at least 40 and greater than or equal to the image size.

Default value: `120`.', example='120', deprecated=true),
  workerSystemDiskSnapshotPolicyId?: string(name='worker_system_disk_snapshot_policy_id', description='[**Deprecated**] When you configure a node pool, use the `system_disk_snapshot_policy_id` parameter of the `scaling_group` field in the `nodepool` section instead.

The ID of the automatic snapshot policy that is used by the system disk specified for worker nodes.', example='sp-2zej1nogjvovnz4z****', deprecated=true),
  workerVswitchIds?: [ string ](name='worker_vswitch_ids', description='[**Deprecated**] When you configure a node pool, use the `vswitch_ids` parameter of the `scaling_group` field in the `nodepool` section instead.

The vSwitches for worker nodes. Each worker node is allocated a vSwitch.

`worker_vswitch_ids` is optional, but `vswitch_ids` is required if you create an ACK managed cluster that does not contain nodes.', deprecated=true),
  zoneId?: string(name='zone_id', description='[Deprecated] Use the `zone_ids` parameter instead.

The ID of the zone to which the cluster belongs. This parameter is specific to ACK Serverless clusters.

When you create an ACK managed cluster, you must set the `zone_id` parameter if `vpc_id` and `vswitch_ids` are not specified. This way, the system automatically creates a VPC in the specified zone. This parameter is invalid if you specify the `vpc_id` and `vswitch_ids` parameters.', example='cn-beiji****', deprecated=true),
  zoneIds?: [ string ](name='zone_ids', description='The IDs of the zone in which the cluster is deployed. This parameter is specific to ACK managed clusters.

When you create an ACK managed cluster, you must set the `zone_id` parameter if `vpc_id` and `vswitch_ids` are not specified. This way, the system automatically creates a VPC in the specified zone. This parameter is invalid if you specify the `vpc_id` and `vswitch_ids` parameters.'),
}

model CreateClusterResponseBody = {
  clusterId?: string(name='cluster_id', description='The ID of the cluster.', example='cb95aa626a47740afbf6aa099b650****'),
  requestId?: string(name='request_id', description='The request ID.', example='687C5BAA-D103-4993-884B-C35E4314A1E1'),
  taskId?: string(name='task_id', description='The task ID.', example='T-5a54309c80282e39ea00002f'),
}

model CreateClusterResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateClusterResponseBody(name='body'),
}

/**
 * @summary Creates a Container Service for Kubernetes (ACK) cluster. For example, you can create an ACK managed cluster, ACK Serverless cluster, ACK Edge cluster, or registered cluster. When you create an ACK cluster, you need to configure the cluster information, components, and cloud resources used by ACK.
 *
 * @description ### [](#-openapi-)Generate API request parameters in the ACK console
 * When you fail to create an ACK cluster by calling the CreateCluster operation due to invalid parameter settings, you can generate valid API request parameters in the ACK console. Procedure:
 * 1.  Log on to the [ACK console](https://cs.console.aliyun.com). In the left-side navigation pane, click **Clusters**.
 * 2.  On the **Cluster** page, click **Cluster Templates**.
 * 3.  In the Select Cluster Template dialog box, select the type of cluster that you want to create and click Create. Then, configure the cluster setting parameters.
 * 4.  After you configure the cluster parameters, click **Generate API Request Parameters** in the **Confirm Order** step.
 *     The API request parameters are displayed in the API Request Parameters dialog box.
 *
 * @param request CreateClusterRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateClusterResponse
 */
async function createClusterWithOptions(request: CreateClusterRequest, headers: map[string]string, runtime: Util.RuntimeOptions): CreateClusterResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.accessControlList)) {
    body['access_control_list'] = request.accessControlList;
  }
  if (!Util.isUnset(request.addons)) {
    body['addons'] = request.addons;
  }
  if (!Util.isUnset(request.apiAudiences)) {
    body['api_audiences'] = request.apiAudiences;
  }
  if (!Util.isUnset(request.autoRenew)) {
    body['auto_renew'] = request.autoRenew;
  }
  if (!Util.isUnset(request.autoRenewPeriod)) {
    body['auto_renew_period'] = request.autoRenewPeriod;
  }
  if (!Util.isUnset(request.chargeType)) {
    body['charge_type'] = request.chargeType;
  }
  if (!Util.isUnset(request.cisEnabled)) {
    body['cis_enabled'] = request.cisEnabled;
  }
  if (!Util.isUnset(request.cloudMonitorFlags)) {
    body['cloud_monitor_flags'] = request.cloudMonitorFlags;
  }
  if (!Util.isUnset(request.clusterDomain)) {
    body['cluster_domain'] = request.clusterDomain;
  }
  if (!Util.isUnset(request.clusterSpec)) {
    body['cluster_spec'] = request.clusterSpec;
  }
  if (!Util.isUnset(request.clusterType)) {
    body['cluster_type'] = request.clusterType;
  }
  if (!Util.isUnset(request.containerCidr)) {
    body['container_cidr'] = request.containerCidr;
  }
  if (!Util.isUnset(request.controlPlaneConfig)) {
    body['control_plane_config'] = request.controlPlaneConfig;
  }
  if (!Util.isUnset(request.controlplaneLogComponents)) {
    body['controlplane_log_components'] = request.controlplaneLogComponents;
  }
  if (!Util.isUnset(request.controlplaneLogProject)) {
    body['controlplane_log_project'] = request.controlplaneLogProject;
  }
  if (!Util.isUnset(request.controlplaneLogTtl)) {
    body['controlplane_log_ttl'] = request.controlplaneLogTtl;
  }
  if (!Util.isUnset(request.cpuPolicy)) {
    body['cpu_policy'] = request.cpuPolicy;
  }
  if (!Util.isUnset(request.customSan)) {
    body['custom_san'] = request.customSan;
  }
  if (!Util.isUnset(request.deletionProtection)) {
    body['deletion_protection'] = request.deletionProtection;
  }
  if (!Util.isUnset(request.disableRollback)) {
    body['disable_rollback'] = request.disableRollback;
  }
  if (!Util.isUnset(request.enableRrsa)) {
    body['enable_rrsa'] = request.enableRrsa;
  }
  if (!Util.isUnset(request.encryptionProviderKey)) {
    body['encryption_provider_key'] = request.encryptionProviderKey;
  }
  if (!Util.isUnset(request.endpointPublicAccess)) {
    body['endpoint_public_access'] = request.endpointPublicAccess;
  }
  if (!Util.isUnset(request.formatDisk)) {
    body['format_disk'] = request.formatDisk;
  }
  if (!Util.isUnset(request.imageId)) {
    body['image_id'] = request.imageId;
  }
  if (!Util.isUnset(request.imageType)) {
    body['image_type'] = request.imageType;
  }
  if (!Util.isUnset(request.instances)) {
    body['instances'] = request.instances;
  }
  if (!Util.isUnset(request.ipStack)) {
    body['ip_stack'] = request.ipStack;
  }
  if (!Util.isUnset(request.isEnterpriseSecurityGroup)) {
    body['is_enterprise_security_group'] = request.isEnterpriseSecurityGroup;
  }
  if (!Util.isUnset(request.keepInstanceName)) {
    body['keep_instance_name'] = request.keepInstanceName;
  }
  if (!Util.isUnset(request.keyPair)) {
    body['key_pair'] = request.keyPair;
  }
  if (!Util.isUnset(request.kubernetesVersion)) {
    body['kubernetes_version'] = request.kubernetesVersion;
  }
  if (!Util.isUnset(request.loadBalancerId)) {
    body['load_balancer_id'] = request.loadBalancerId;
  }
  if (!Util.isUnset(request.loadBalancerSpec)) {
    body['load_balancer_spec'] = request.loadBalancerSpec;
  }
  if (!Util.isUnset(request.loggingType)) {
    body['logging_type'] = request.loggingType;
  }
  if (!Util.isUnset(request.loginPassword)) {
    body['login_password'] = request.loginPassword;
  }
  if (!Util.isUnset(request.maintenanceWindow)) {
    body['maintenance_window'] = request.maintenanceWindow;
  }
  if (!Util.isUnset(request.masterAutoRenew)) {
    body['master_auto_renew'] = request.masterAutoRenew;
  }
  if (!Util.isUnset(request.masterAutoRenewPeriod)) {
    body['master_auto_renew_period'] = request.masterAutoRenewPeriod;
  }
  if (!Util.isUnset(request.masterCount)) {
    body['master_count'] = request.masterCount;
  }
  if (!Util.isUnset(request.masterInstanceChargeType)) {
    body['master_instance_charge_type'] = request.masterInstanceChargeType;
  }
  if (!Util.isUnset(request.masterInstanceTypes)) {
    body['master_instance_types'] = request.masterInstanceTypes;
  }
  if (!Util.isUnset(request.masterPeriod)) {
    body['master_period'] = request.masterPeriod;
  }
  if (!Util.isUnset(request.masterPeriodUnit)) {
    body['master_period_unit'] = request.masterPeriodUnit;
  }
  if (!Util.isUnset(request.masterSystemDiskCategory)) {
    body['master_system_disk_category'] = request.masterSystemDiskCategory;
  }
  if (!Util.isUnset(request.masterSystemDiskPerformanceLevel)) {
    body['master_system_disk_performance_level'] = request.masterSystemDiskPerformanceLevel;
  }
  if (!Util.isUnset(request.masterSystemDiskSize)) {
    body['master_system_disk_size'] = request.masterSystemDiskSize;
  }
  if (!Util.isUnset(request.masterSystemDiskSnapshotPolicyId)) {
    body['master_system_disk_snapshot_policy_id'] = request.masterSystemDiskSnapshotPolicyId;
  }
  if (!Util.isUnset(request.masterVswitchIds)) {
    body['master_vswitch_ids'] = request.masterVswitchIds;
  }
  if (!Util.isUnset(request.name)) {
    body['name'] = request.name;
  }
  if (!Util.isUnset(request.natGateway)) {
    body['nat_gateway'] = request.natGateway;
  }
  if (!Util.isUnset(request.nodeCidrMask)) {
    body['node_cidr_mask'] = request.nodeCidrMask;
  }
  if (!Util.isUnset(request.nodeNameMode)) {
    body['node_name_mode'] = request.nodeNameMode;
  }
  if (!Util.isUnset(request.nodePortRange)) {
    body['node_port_range'] = request.nodePortRange;
  }
  if (!Util.isUnset(request.nodepools)) {
    body['nodepools'] = request.nodepools;
  }
  if (!Util.isUnset(request.numOfNodes)) {
    body['num_of_nodes'] = request.numOfNodes;
  }
  if (!Util.isUnset(request.operationPolicy)) {
    body['operation_policy'] = request.operationPolicy;
  }
  if (!Util.isUnset(request.osType)) {
    body['os_type'] = request.osType;
  }
  if (!Util.isUnset(request.period)) {
    body['period'] = request.period;
  }
  if (!Util.isUnset(request.periodUnit)) {
    body['period_unit'] = request.periodUnit;
  }
  if (!Util.isUnset(request.platform)) {
    body['platform'] = request.platform;
  }
  if (!Util.isUnset(request.podVswitchIds)) {
    body['pod_vswitch_ids'] = request.podVswitchIds;
  }
  if (!Util.isUnset(request.profile)) {
    body['profile'] = request.profile;
  }
  if (!Util.isUnset(request.proxyMode)) {
    body['proxy_mode'] = request.proxyMode;
  }
  if (!Util.isUnset(request.rdsInstances)) {
    body['rds_instances'] = request.rdsInstances;
  }
  if (!Util.isUnset(request.regionId)) {
    body['region_id'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceGroupId)) {
    body['resource_group_id'] = request.resourceGroupId;
  }
  if (!Util.isUnset(request.runtime)) {
    body['runtime'] = request.runtime;
  }
  if (!Util.isUnset(request.securityGroupId)) {
    body['security_group_id'] = request.securityGroupId;
  }
  if (!Util.isUnset(request.securityHardeningOs)) {
    body['security_hardening_os'] = request.securityHardeningOs;
  }
  if (!Util.isUnset(request.serviceAccountIssuer)) {
    body['service_account_issuer'] = request.serviceAccountIssuer;
  }
  if (!Util.isUnset(request.serviceCidr)) {
    body['service_cidr'] = request.serviceCidr;
  }
  if (!Util.isUnset(request.serviceDiscoveryTypes)) {
    body['service_discovery_types'] = request.serviceDiscoveryTypes;
  }
  if (!Util.isUnset(request.snatEntry)) {
    body['snat_entry'] = request.snatEntry;
  }
  if (!Util.isUnset(request.socEnabled)) {
    body['soc_enabled'] = request.socEnabled;
  }
  if (!Util.isUnset(request.sshFlags)) {
    body['ssh_flags'] = request.sshFlags;
  }
  if (!Util.isUnset(request.tags)) {
    body['tags'] = request.tags;
  }
  if (!Util.isUnset(request.taints)) {
    body['taints'] = request.taints;
  }
  if (!Util.isUnset(request.timeoutMins)) {
    body['timeout_mins'] = request.timeoutMins;
  }
  if (!Util.isUnset(request.timezone)) {
    body['timezone'] = request.timezone;
  }
  if (!Util.isUnset(request.userCa)) {
    body['user_ca'] = request.userCa;
  }
  if (!Util.isUnset(request.userData)) {
    body['user_data'] = request.userData;
  }
  if (!Util.isUnset(request.vpcid)) {
    body['vpcid'] = request.vpcid;
  }
  if (!Util.isUnset(request.vswitchIds)) {
    body['vswitch_ids'] = request.vswitchIds;
  }
  if (!Util.isUnset(request.workerAutoRenew)) {
    body['worker_auto_renew'] = request.workerAutoRenew;
  }
  if (!Util.isUnset(request.workerAutoRenewPeriod)) {
    body['worker_auto_renew_period'] = request.workerAutoRenewPeriod;
  }
  if (!Util.isUnset(request.workerDataDisks)) {
    body['worker_data_disks'] = request.workerDataDisks;
  }
  if (!Util.isUnset(request.workerInstanceChargeType)) {
    body['worker_instance_charge_type'] = request.workerInstanceChargeType;
  }
  if (!Util.isUnset(request.workerInstanceTypes)) {
    body['worker_instance_types'] = request.workerInstanceTypes;
  }
  if (!Util.isUnset(request.workerPeriod)) {
    body['worker_period'] = request.workerPeriod;
  }
  if (!Util.isUnset(request.workerPeriodUnit)) {
    body['worker_period_unit'] = request.workerPeriodUnit;
  }
  if (!Util.isUnset(request.workerSystemDiskCategory)) {
    body['worker_system_disk_category'] = request.workerSystemDiskCategory;
  }
  if (!Util.isUnset(request.workerSystemDiskPerformanceLevel)) {
    body['worker_system_disk_performance_level'] = request.workerSystemDiskPerformanceLevel;
  }
  if (!Util.isUnset(request.workerSystemDiskSize)) {
    body['worker_system_disk_size'] = request.workerSystemDiskSize;
  }
  if (!Util.isUnset(request.workerSystemDiskSnapshotPolicyId)) {
    body['worker_system_disk_snapshot_policy_id'] = request.workerSystemDiskSnapshotPolicyId;
  }
  if (!Util.isUnset(request.workerVswitchIds)) {
    body['worker_vswitch_ids'] = request.workerVswitchIds;
  }
  if (!Util.isUnset(request.zoneId)) {
    body['zone_id'] = request.zoneId;
  }
  if (!Util.isUnset(request.zoneIds)) {
    body['zone_ids'] = request.zoneIds;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateCluster',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/clusters`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Creates a Container Service for Kubernetes (ACK) cluster. For example, you can create an ACK managed cluster, ACK Serverless cluster, ACK Edge cluster, or registered cluster. When you create an ACK cluster, you need to configure the cluster information, components, and cloud resources used by ACK.
 *
 * @description ### [](#-openapi-)Generate API request parameters in the ACK console
 * When you fail to create an ACK cluster by calling the CreateCluster operation due to invalid parameter settings, you can generate valid API request parameters in the ACK console. Procedure:
 * 1.  Log on to the [ACK console](https://cs.console.aliyun.com). In the left-side navigation pane, click **Clusters**.
 * 2.  On the **Cluster** page, click **Cluster Templates**.
 * 3.  In the Select Cluster Template dialog box, select the type of cluster that you want to create and click Create. Then, configure the cluster setting parameters.
 * 4.  After you configure the cluster parameters, click **Generate API Request Parameters** in the **Confirm Order** step.
 *     The API request parameters are displayed in the API Request Parameters dialog box.
 *
 * @param request CreateClusterRequest
 * @return CreateClusterResponse
 */
async function createCluster(request: CreateClusterRequest): CreateClusterResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return createClusterWithOptions(request, headers, runtime);
}

model CreateClusterDiagnosisRequest {
  target?: map[string]any(name='target', description='The parameter used to specify the diagnostic object. Examples of parameters for different types of diagnostic objects:

node:

    {"name": "cn-shanghai.10.10.10.107"}

pod

    {"namespace": "kube-system", "name": "csi-plugin-2cg9f"}

network

    {"src": "10.10.10.108", "dst": "10.11.247.16", "dport": "80"}

ingress

    {"url": "https://example.com"}

memory

    {"node":"cn-hangzhou.172.16.9.240"}

service

    {"namespace": "kube-system", "name": "nginx-ingress-lb"}', example='{"namespace": "kube-system", "name": "csi-plugin-2cg9f"}'),
  type?: string(name='type', description='The type of the diagnostic.

Valid values:

*   node
*   ingress
*   cluster
*   memory
*   pod
*   service
*   network', example='node'),
}

model CreateClusterDiagnosisResponseBody = {
  clusterId?: string(name='cluster_id', description='The cluster ID.', example='c5cdf7e3938bc4f8eb0e44b21a80f****'),
  diagnosisId?: string(name='diagnosis_id', description='The diagnostic ID.', example='6f719f23098240818eb26fe3a37d****'),
  requestId?: string(name='request_id', description='The request ID.', example='687C5BAA-D103-4993-884B-C35E4314****'),
}

model CreateClusterDiagnosisResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateClusterDiagnosisResponseBody(name='body'),
}

/**
 * @summary Starts a cluster diagnostic.
 *
 * @param request CreateClusterDiagnosisRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateClusterDiagnosisResponse
 */
async function createClusterDiagnosisWithOptions(clusterId: string, request: CreateClusterDiagnosisRequest, headers: map[string]string, runtime: Util.RuntimeOptions): CreateClusterDiagnosisResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.target)) {
    body['target'] = request.target;
  }
  if (!Util.isUnset(request.type)) {
    body['type'] = request.type;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateClusterDiagnosis',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/clusters/${OpenApiUtil.getEncodeParam(clusterId)}/diagnosis`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Starts a cluster diagnostic.
 *
 * @param request CreateClusterDiagnosisRequest
 * @return CreateClusterDiagnosisResponse
 */
async function createClusterDiagnosis(clusterId: string, request: CreateClusterDiagnosisRequest): CreateClusterDiagnosisResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return createClusterDiagnosisWithOptions(clusterId, request, headers, runtime);
}

model CreateClusterNodePoolRequest {
  autoScaling?: {
    eipBandwidth?: long(name='eip_bandwidth', description='This parameter is deprecated.

The maximum bandwidth of the EIP. Unit: Mbit/s.

**

**Important** This parameter is deprecated. Use the internet_charge_type and internet_max_bandwidth_out parameters instead.', example='5', deprecated=true),
    eipInternetChargeType?: string(name='eip_internet_charge_type', description='This parameter is deprecated.

The metering method of the EIP. Valid values:

*   `PayByBandwidth`: pay-by-bandwidth.
*   `PayByTraffic`: pay-by-data-transfer.

Default value: `PayByBandwidth`.

**

**Important** This parameter is deprecated. Use the internet_charge_type and internet_max_bandwidth_out parameters instead.', example='PayByBandwidth', deprecated=true),
    enable?: boolean(name='enable', description='Specifies whether to enable auto scaling for the node pool. Valid values:

*   `true`: enables auto scaling.
*   `false`: disables auto scaling. If you set this parameter to false, other parameters in the `auto_scaling` section do not take effect.

Default value: `false`.', example='true'),
    isBondEip?: boolean(name='is_bond_eip', description='This parameter is deprecated.

Specifies whether to associate an elastic IP address (EIP) with the node pool. Valid values:

*   `true`: associates an EIP with the node pool.
*   `false`: does not associate an EIP with the node pool.

Default value: `false`.

**

**Important** This parameter is deprecated. Use the internet_charge_type and internet_max_bandwidth_out parameters instead.', example='true', deprecated=true),
    maxInstances?: long(name='max_instances', description='The maximum number to which the Elastic Compute Service (ECS) instances in the node pool can be scaled. The number of nodes in the node pool cannot be greater than this value. This parameter takes effect only if `enable` is set to true. Valid values: [min_instances, 2000]. Default value: 0.', example='10'),
    minInstances?: long(name='min_instances', description='The minimum number to which the ECS instances in the node pool can be scaled. The number of nodes in the node pool cannot be smaller than this value. This parameter takes effect only if `enable` is set to true. Valid values: [0, max_instances]. Default value: 0.', example='1'),
    type?: string(name='type', description='The instance type that is used for auto scaling. This parameter takes effect only if `enable` is set to true. Valid values:

*   `cpu`: regular instance.
*   `gpu`: GPU-accelerated instance.
*   `gpushare`: shared GPU-accelerated instance.
*   `spot`: preemptible instance.

Default value: `cpu`.

>  You cannot modify this parameter after the node pool is created.', example='cpu'),
  }(name='auto_scaling', description='The configurations of auto scaling.'),
  count?: long(name='count', description='This parameter is deprecated. Use the desired_size parameter instead.

The number of nodes in the node pool.', example='1', deprecated=true),
  hostNetwork?: boolean(name='host_network', description='Specifies whether to set the network type of the pod to host network.

*   `true`: sets to host network.
*   `false`: sets to container network.', example='true'),
  interconnectConfig?: {
    bandwidth?: long(name='bandwidth', description='This parameter is deprecated.

The bandwidth of the enhanced edge node pool. Unit: Mbit/s.', example='10'),
    ccnId?: string(name='ccn_id', description='This parameter is deprecated.

The ID of the Cloud Connect Network (CCN) instance that is associated with the enhanced edge node pool.', example='ccn-qm5i0i0q9yi*******'),
    ccnRegionId?: string(name='ccn_region_id', description='This parameter is deprecated.

The region to which the CCN instance that is associated with the enhanced edge node pool belongs.', example='cn-shanghai'),
    cenId?: string(name='cen_id', description='This parameter is deprecated.

The ID of the Cloud Enterprise Network (CEN) instance that is associated with the enhanced edge node pool.', example='cen-ey9k9nfhz0f*******'),
    improvedPeriod?: string(name='improved_period', description='This parameter is deprecated.

The subscription duration of the enhanced edge node pool. The duration is measured in months.', example='1'),
  }(name='interconnect_config', description='This parameter is deprecated.

The configurations of the edge node pool.', deprecated=true),
  interconnectMode?: string(name='interconnect_mode', description='The network type of the edge node pool. This parameter takes effect only when the `type` of the node pool is set to `edge`. Valid values:

*   `basic`: Internet.
*   `private`: private network.', example='basic'),
  intranet?: boolean(name='intranet', description='Specifies whether all nodes in the edge node pool can communicate with each other at Layer 3.

*   `true`: The nodes in the edge node pool can communicate with each other at Layer 3.
*   `false`: The nodes in the edge node pool cannot communicate with each other at Layer 3.', example='true'),
  kubernetesConfig?: {
    cmsEnabled?: boolean(name='cms_enabled', description='Specifies whether to install the CloudMonitor agent on ECS nodes. After the CloudMonitor agent is installed on ECS nodes, you can view monitoring information about the instances in the CloudMonitor console. We recommend that you install the CloudMonitor agent. Valid values:

*   `true`: installs the CloudMonitor agent on ECS nodes.
*   `false`: does not install the CloudMonitor agent on ECS nodes.

Default value: `false`.', example='true'),
    cpuPolicy?: string(name='cpu_policy', description='The CPU management policy of nodes in the node pool. The following policies are supported if the Kubernetes version of the cluster is 1.12.6 or later:

*   `static`: allows pods with specific resource characteristics on the node to be granted with enhanced CPU affinity and exclusivity.
*   `none`: specifies that the default CPU affinity is used.

Default value: `none`.', example='none'),
    labels?: [
      Tag
    ](name='labels', description='The labels that you want to add to the nodes in the cluster.'),
    nodeNameMode?: string(name='node_name_mode', description='A custom node name consists of a prefix, a node IP address, and a suffix.

*   The prefix and the suffix can contain multiple parts that are separated by periods (.). Each part can contain lowercase letters, digits, and hyphens (-). A custom node name must start and end with a digit or lowercase letter.
*   The node IP address in a custom node name is the private IP address of the node.

Set the parameter to a value in the customized,aliyun,ip,com format. The value consists of four parts that are separated by commas (,). customized and ip are fixed content. aliyun is the prefix and com is the suffix. Example: aliyun.192.168.xxx.xxx.com.', example='customized,aliyun,ip,com'),
    preUserData?: string(name='pre_user_data', description='The user-defined data of nodes. You can specify custom scripts that are automatically executed before the nodes are initialized.', example='dGhpcyBpcyBhIGV4YW1wbGU'),
    runtime?: string(name='runtime', description='The name of the container runtime. The following types of runtime are supported by ACK:

*   containerd: containerd is the recommended runtime and supports all Kubernetes versions.
*   Sandboxed-Container.runv: The Sandbox-Container runtime provides improved isolation and supports Kubernetes 1.24 and earlier.
*   docker: The Docker runtime supports Kubernetes 1.22 and earlier.

Default value: containerd.', example='docker'),
    runtimeVersion?: string(name='runtime_version', description='The version of the container runtime.', example='19.03.5'),
    taints?: [
      Taint
    ](name='taints', description='The configurations of the taints.'),
    unschedulable?: boolean(name='unschedulable', description='Specifies whether the nodes are schedulable after a scale-out operation is performed.', example='true'),
    userData?: string(name='user_data', description='The user-defined data of nodes. You can specify custom scripts that are automatically executed after the nodes are initialized.', example='dGhpcyBpcyBhIGV4YW1wbGU='),
  }(name='kubernetes_config', description='The configurations of the cluster.'),
  management?: {
    autoRepair?: boolean(name='auto_repair', description='Specifies whether to enable auto node repair. This parameter takes effect only if `enable` is set to true.

*   `true`: enables auto node repair.
*   `false`: disables auto node repair.

If `enable` is set to true, the default value of this parameter is `true`. If `enable` is set to false, the default value of this parameter is `false`.', example='false'),
    autoRepairPolicy?: {
      restartNode?: boolean(name='restart_node', description='Specifies whether to allow node restart. This parameter takes effect only if `auto_repair` is set to true. Valid values:

*   `true`: allows node restart.
*   `false`: does not allow node restart.

If `auto_repair` is set to true, the default value of this parameter is `true`. If `auto_repair` is set to false, the default value of this parameter is `false`.', example='true'),
    }(name='auto_repair_policy', description='The auto node repair policy.'),
    autoUpgrade?: boolean(name='auto_upgrade', description='Specifies whether to enable auto node upgrade. This parameter takes effect only if `enable` is set to true.

*   `true`: enables auto node upgrade.
*   `false`: disables auto node upgrade.

If `enable` is set to true, the default value of this parameter is `true`. If `enable` is set to false, the default value of this parameter is `false`.', example='true'),
    autoUpgradePolicy?: {
      autoUpgradeKubelet?: boolean(name='auto_upgrade_kubelet', description='Specifies whether to allow the auto upgrade of the kubelet. This parameter takes effect only if `auto_upgrade` is set to true. Valid values:

*   `true`: allows the auto upgrade of the kubelet.
*   `false`: does not allow the auto upgrade of the kubelet.

If `auto_upgrade` is set to true, the default value of this parameter is `true`. If `auto_upgrade` is set to false, the default value of this parameter is `false`.', example='true'),
      autoUpgradeOs?: boolean(name='auto_upgrade_os', description='Specifies whether to allow the auto upgrade of the OS. This parameter takes effect only if `auto_upgrade` is set to true. Valid values:

*   `true`: allows the auto upgrade of the OS.
*   `false`: does not allow the auto upgrade of the OS.

Default value: `false`.'),
      autoUpgradeRuntime?: boolean(name='auto_upgrade_runtime', description='Specifies whether to allow the auto upgrade of the runtime. This parameter takes effect only if `auto_upgrade` is set to true. Valid values:

*   `true`: allows the auto upgrade of the runtime.
*   `false`: does not allow the auto upgrade of the runtime.

Default value: `false`.'),
    }(name='auto_upgrade_policy', description='The auto node upgrade policy.'),
    autoVulFix?: boolean(name='auto_vul_fix', description='Specifies whether to enable auto Common Vulnerabilities and Exposures (CVE) patching. This parameter takes effect only if `enable` is set to true.

*   `true`: enables auto CVE patching.
*   `false`: disables auto CVE patching.

If `enable` is set to true, the default value of this parameter is `true`. If `enable` is set to false, the default value of this parameter is `false`.', example='true'),
    autoVulFixPolicy?: {
      restartNode?: boolean(name='restart_node', description='Specifies whether to allow node restart. This parameter takes effect only if `auto_vul_fix` is set to true. Valid values:

*   `true`: allows node restart.
*   `false`: does not allow node restart. If `auto_vul_fix` is set to true, the default value of this parameter is `false`. If `auto_vul_fix` is set to false, the default value of this parameter is `false`.', example='true'),
      vulLevel?: string(name='vul_level', description='The severity levels of CVEs that can be automatically patched. Separate multiple levels with commas (,). Example: `asap,later`. Valid values:

*   `asap`: high.
*   `later`: medium.
*   `nntf`: low.

If `auto_vul_fix` is set to true, the default value of this parameter is `asap`.', example='asap,nntf'),
    }(name='auto_vul_fix_policy', description='The auto CVE patching policy.'),
    enable?: boolean(name='enable', description='Specifies whether to enable the managed node pool feature. Valid values:

*   `true`: enables the managed node pool feature.
*   `false`: disables the managed node pool feature. Other parameters in this section take effect only if enable is set to true.

Default value: false.', example='false'),
    upgradeConfig?: {
      autoUpgrade?: boolean(name='auto_upgrade', description='Specifies whether to enable auto upgrade. Valid values:

*   `true`: enables auto OS upgrade.
*   `false`: disables auto OS upgrade.

**

**Caution** This parameter is deprecated. Use the preceding auto_upgrade parameter instead.', example='false', deprecated=true),
      maxUnavailable?: long(name='max_unavailable', description='The maximum number of nodes that can be in the Unavailable state. Valid values: 1 to 1000.

Default value: 1', example='1'),
      surge?: long(name='surge', description='The number of nodes that are temporarily added to the node pool during an auto upgrade.', example='0'),
      surgePercentage?: long(name='surge_percentage', description='The percentage of additional nodes that are temporarily added to the node pool during an auto update. You must set this parameter or `surge`.', example='0'),
    }(name='upgrade_config', description='The configurations of auto upgrade. The configurations take effects only if `enable` is set to true.', deprecated=true),
  }(name='management', description='The configurations of the managed node pool feature.'),
  maxNodes?: long(name='max_nodes', description='This parameter is deprecated.

The maximum number of nodes that can be contained in the edge node pool.', example='10', deprecated=true),
  nodeConfig?: {
    kubeletConfiguration?: KubeletConfig(name='kubelet_configuration', description='The configurations of the kubelet.'),
  }(name='node_config', description='The node configurations.'),
  nodepoolInfo?: {
    name?: string(name='name', description='The name of the node pool.

This parameter is required.', example='cluster-demo'),
    resourceGroupId?: string(name='resource_group_id', description='The ID of the resource group to which the node pool belongs. Instances that are added to the node pool belong to this resource group.', example='rg-acfmyvw3wjmb****'),
    type?: string(name='type', description='The type of node pool. Valid values:

*   `ess`: regular node pool, which supports the managed node pool feature and the auto scaling feature.
*   `edge`: edge node pool.
*   `lingjun`: Lingjun node pool.', example='ess'),
  }(name='nodepool_info', description='The configurations of the node pool.'),
  scalingGroup?: {
    autoRenew?: boolean(name='auto_renew', description='Specifies whether to enable auto-renewal for nodes in the node pool. This parameter takes effect only when you set `instance_charge_type` to `PrePaid`. Valid values:

*   `true`: enables auto-renewal.
*   `false`: disables auto-renewal.

Default value: `false`.', example='true'),
    autoRenewPeriod?: long(name='auto_renew_period', description='The auto-renewal period. Valid values:

*   Valid values when PeriodUnit is set to Week: 1, 2, and 3.
*   Valid values when PeriodUnit is set to Month: 1, 2, 3, 6, 12, 24, 36, 48, and 60.

Default value: 1.', example='1'),
    cisEnabled?: boolean(name='cis_enabled', description='This parameter is deprecated. Use security_hardening_os instead.', example='false', deprecated=true),
    compensateWithOnDemand?: boolean(name='compensate_with_on_demand', description='Specifies whether to automatically create pay-as-you-go instances to meet the required number of ECS instances if preemptible instances cannot be created due to reasons such as the price or insufficient inventory. This parameter takes effect when you set `multi_az_policy` to `COST_OPTIMIZED`. Valid values:

*   `true`: automatically creates pay-as-you-go instances to meet the required number of ECS instances if preemptible instances cannot be created.
*   `false`: does not create pay-as-you-go instances to meet the required number of ECS instances if preemptible instances cannot be created.', example='true'),
    dataDisks?: [
      DataDisk
    ](name='data_disks', description='The configurations of the data disks that are attached to nodes in the node pool.'),
    deploymentsetId?: string(name='deploymentset_id', description='The ID of the deployment set.', example='ds-bp1d19mmbsv3jf6xxxxx'),
    desiredSize?: long(name='desired_size', description='The expected number of nodes in the node pool.', example='0'),
    imageId?: string(name='image_id', description='The custom image ID. By default, the image provided by Container Service for Kubernetes (ACK) is used.', example='aliyun_2_1903_x64_20G_alibase_20200529.vhd'),
    imageType?: string(name='image_type', description='The type of the OS image. You must specify this parameter or `platform`. Valid values:

*   `AliyunLinux`: Alibaba Cloud Linux 2.
*   `AliyunLinuxSecurity`: Alibaba Cloud Linux 2 (UEFI).
*   `AliyunLinux3`: Alibaba Cloud Linux 3
*   `AliyunLinux3Arm64`: Alibaba Cloud Linux 3 (ARM).
*   `AliyunLinux3Security`: Alibaba Cloud Linux 3 (UEFI).
*   `CentOS`: CentOS.
*   `Windows`: Windows.
*   `WindowsCore`: Windows Core.
*   `ContainerOS`: ContainerOS.
*   `AliyunLinux3ContainerOptimized`: Alibaba Cloud Linux 3 Container-optimized.', example='AliyunLinux'),
    instanceChargeType?: string(name='instance_charge_type', description='The billing method of nodes in the node pool. Valid values:

*   `PrePaid`: subscription.
*   `PostPaid`: pay-as-you-go.

Default value: `PostPaid`.

This parameter is required.', example='PrePaid'),
    instancePatterns?: [
      InstancePatterns
    ](name='instance_patterns', description='The instance attributes.'),
    instanceTypes?: [ string ](name='instance_types', description='The instance types of nodes in the node pool. When the system adds a node to the node pool, the system selects the most appropriate one from the specified instance types for the node. You can specify 1 to 10 instance types.

>  To ensure high availability, we recommend that you specify multiple instance types.

This parameter is required.'),
    internetChargeType?: string(name='internet_charge_type', description='The metering method of the public IP address. Valid values:

*   PayByBandwidth: pay-by-bandwidth.
*   PayByTraffic: pay-by-data-transfer.', example='PayByTraffic'),
    internetMaxBandwidthOut?: long(name='internet_max_bandwidth_out', description='The maximum outbound bandwidth of the public IP address. Unit: Mbit/s. Valid values: 1 to 100.', example='5'),
    keyPair?: string(name='key_pair', description='The name of the key pair used to log on to nodes in the node pool. You must set this parameter or `login_password`.

>  If you select ContainerOS as the OS of nodes in the node pool, you must specify `key_pair`.', example='np-key-name'),
    loginAsNonRoot?: boolean(name='login_as_non_root', description='Specifies whether to allow a non-root user to log on to an ECS instance that is added to the node pool.', example='true'),
    loginPassword?: string(name='login_password', description='The password for SSH logon. You must set this parameter or `key_pair`. The password must be 8 to 30 characters in length, and must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters.', example='Hello1234'),
    multiAzPolicy?: string(name='multi_az_policy', description='The ECS instance scaling policy for the multi-zone scaling group. Valid values:

*   `PRIORITY`: ECS instances are scaled based on the value of VSwitchIds.N. If an ECS instance cannot be created in the zone where the vSwitch that has the highest priority resides, the system creates the ECS instance in the zone where the vSwitch that has the next highest priority resides.

*   `COST_OPTIMIZED`: ECS instances are created based on the vCPU unit price in ascending order. Preemptible instances are preferably created if preemptible instance types are specified in the scaling configurations. You can set the `CompensateWithOnDemand` parameter to specify whether to automatically create pay-as-you-go instances when preemptible instances cannot be created due to insufficient inventory.

    **

    **Note** `COST_OPTIMIZED` takes effect only when multiple instance types are specified or at least one preemptible instance type is specified.

*   `BALANCE`: ECS instances are evenly distributed across multiple zones for the scaling group. If ECS instances become imbalanced among multiple zones due to insufficient inventory, you can call the [RebalanceInstances](https://help.aliyun.com/document_detail/71516.html) operation of Auto Scaling to evenly distribute the ECS instances among zones.

Default value: `PRIORITY`.', example='COST_OPTIMIZED'),
    onDemandBaseCapacity?: long(name='on_demand_base_capacity', description='The minimum number of pay-as-you-go instances that must be kept in the scaling group. Valid values: 0 to 1000. If the number of pay-as-you-go instances is less than the value of this parameter, the system preferably creates pay-as-you-go instances.', example='0'),
    onDemandPercentageAboveBaseCapacity?: long(name='on_demand_percentage_above_base_capacity', description='The percentage of pay-as-you-go instances among the extra instances that exceed the number specified by `on_demand_base_capacity`. Valid values: 0 to 100.', example='20'),
    period?: long(name='period', description='The subscription duration of nodes in the node pool. This parameter takes effect and is required if you set `instance_charge_type` to `PrePaid`.

*   If `period_unit` is set to Week, the valid values of `period` are 1, 2, 3, and 4.
*   If `period_unit` is set to Month, the valid values of `period` are 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36, 48, and 60.', example='1'),
    periodUnit?: string(name='period_unit', description='The billing cycle of nodes in the node pool. This parameter takes effect and is required if you set `instance_charge_type` to `PrePaid`. Valid values:

*   `Month`: The subscription duration is measured in months.
*   `Week`: The subscription duration is measured in weeks.

Default value: `Month`.', example='Month'),
    platform?: string(name='platform', description='The OS distribution that is used. Valid values:

*   `CentOS`
*   `AliyunLinux`
*   `Windows`
*   `WindowsCore`

Default value: `AliyunLinux`.', example='AliyunLinux', deprecated=true),
    privatePoolOptions?: {
      id?: string(name='id', description='The ID of the private node pool.', example='eap-bp67acfmxazb4****'),
      matchCriteria?: string(name='match_criteria', description='The type of private node pool. This parameter specifies the type of private pool that you want to use to create instances. A private pool is generated when an elasticity assurance or a capacity reservation takes effect. The system selects a private pool to start instances. Valid values:

*   `Open`: uses an open private pool. The system selects an open private pool to start instances. If no matching open private pools are available, the resources in the public pool are used.
*   `Target`: uses a specified private pool. The system uses the resources of the specified private pool to start instances. If the specified private pool is unavailable, instances cannot be started.
*   `None`: no private pool is used. The resources of private pools are not used to launch the instances.', example='Open'),
    }(name='private_pool_options', description='The configurations of the private node pool.'),
    ramRoleName?: string(name='ram_role_name', description='The name of the worker RAM role.

*   If you do not specify this parameter, the default worker RAM role created by the cluster is used.
*   The specified RAM role must be a **regular service role** and the **Select Trusted Service** parameter must be set to **Elastic Compute Service**. For more information, see [Create a normal service role](https://help.aliyun.com/document_detail/116800.html). If the specified RAM role is not the default worker RAM role created by the cluster, the name of the RAM role cannot start with `KubernetesMasterRole-` or `KubernetesWorkerRole-`.

>  This parameter is available only for ACK managed clusters that run Kubernetes 1.22 or later.', example='example-role'),
    rdsInstances?: [ string ](name='rds_instances', description='The IDs of ApsaraDB RDS instances.'),
    scalingPolicy?: string(name='scaling_policy', description='The scaling mode of the scaling group. Valid values:

*   `release`: the standard mode. ECS instances are created and released based on resource usage.
*   `recycle`: the swift mode. ECS instances are created, stopped, or started during scaling events. This reduces the time required for the next scale-out event. When the instance is stopped, you are charged only for the storage service. This does not apply to ECS instances that are attached with local disks.

Default value: `release`.', example='release'),
    securityGroupId?: string(name='security_group_id', description='The ID of the security group to which you want to add the node pool. You must specify this parameter or the `security_group_ids` parameter. We recommend that you specify `security_group_ids`.', example='sg-wz9a8g2mt6x5llu0****', deprecated=true),
    securityGroupIds?: [ string ](name='security_group_ids', description='The IDs of security groups. You must specify this parameter or `security_group_id`. We recommend that you specify `security_group_ids`. If you specify both `security_group_id` and `security_group_ids`, `security_group_ids` is used.'),
    securityHardeningOs?: boolean(name='security_hardening_os', description='Specifies whether to enable Alibaba Cloud Linux Security Hardening. Valid values:

*   `true`: enables Alibaba Cloud Linux Security Hardening.
*   `false`: disables Alibaba Cloud Linux Security Hardening.

Default value: `false`.'),
    socEnabled?: boolean(name='soc_enabled', description='Specifies whether to enable MLPS Security Hardening. You can enable security hardening based on Multi-Level Protection Scheme (MLPS) only when Alibaba Cloud Linux 2 or Alibaba Cloud Linux 3 is installed on nodes. Alibaba Cloud provides standards for baseline checks and a scanner to ensure the compliance of Alibaba Cloud Linux 2 and Alibaba Cloud Linux 3 images with the level 3 standards of MLPS 2.0.', example='false'),
    spotInstancePools?: long(name='spot_instance_pools', description='The number of instance types that are available for creating preemptible instances. Auto Scaling creates preemptible instances of multiple instance types that are available at the lowest cost. Valid values: 1 to 10.', example='5'),
    spotInstanceRemedy?: boolean(name='spot_instance_remedy', description='Indicates whether preemptible instances can be supplemented. If you set this parameter to true, when the scaling group receives a system message indicating that a preemptible instance is to be reclaimed, the scaling group attempts to create a new instance to replace this instance. Valid values:

*   `true`: enables the supplementation of preemptible instances.
*   `false`: disables the supplementation of preemptible instances.', example='false'),
    spotPriceLimit?: [ 
      {
        instanceType?: string(name='instance_type', description='The instance type of preemptible instances.', example='ecs.c6.large'),
        priceLimit?: string(name='price_limit', description='The price cap of a preemptible instance of the type.', example='0.39'),
      }
    ](name='spot_price_limit', description='The instance type of preemptible instances and the price cap for the instance type.'),
    spotStrategy?: string(name='spot_strategy', description='The bidding policy of preemptible instances. Valid values:

*   `NoSpot`: non-preemptible.
*   `SpotWithPriceLimit`: specifies the highest bid for the preemptible instance.
*   `SpotAsPriceGo`: automatically submits bids based on the up-to-date market price.

For more information, see [Use preemptible instances](https://help.aliyun.com/document_detail/165053.html).', example='NoSpot'),
    systemDiskBurstingEnabled?: boolean(name='system_disk_bursting_enabled', description='Specifies whether to enable the burst feature for the system disk. Valid values:

*   true: enables the burst feature.
*   false: disables the burst feature.

This parameter is available only when `SystemDiskCategory` is set to `cloud_auto`. For more information, see [ESSD AutoPL disks](https://help.aliyun.com/document_detail/368372.html).', example='true'),
    systemDiskCategories?: [ string ](name='system_disk_categories', description='The categories of the system disk for nodes. The system attempts to create system disks of a disk category with a lower priority if the disk category with a higher priority is unavailable. Valid values:

*   `cloud`: basic disk.
*   `cloud_efficiency`: ultra disk.
*   `cloud_ssd`: standard SSD.
*   `cloud_essd`: ESSD.
*   `cloud_auto`: ESSD AutoPL disk.
*   `cloud_essd_entry`: ESSD Entry disk.'),
    systemDiskCategory?: string(name='system_disk_category', description='The category of the system disk. Valid values:

*   `cloud`: basic disk.
*   `cloud_efficiency`: ultra disk.
*   `cloud_ssd`: standard SSD.
*   `cloud_essd`: Enterprise ESSD (ESSD).
*   `cloud_auto`: ESSD AutoPL disk.
*   `cloud_essd_entry`: ESSD Entry disk.

Default value: `cloud_efficiency`.', example='cloud_efficiency'),
    systemDiskEncryptAlgorithm?: string(name='system_disk_encrypt_algorithm', description='The encryption algorithm that is used to encrypt the system disk. The value is aes-256.', example='aes-256'),
    systemDiskEncrypted?: boolean(name='system_disk_encrypted', description='Specifies whether to encrypt the system disk. true: encrypts the system disk. false: does not encrypt the system disk.', example='false'),
    systemDiskKmsKeyId?: string(name='system_disk_kms_key_id', description='The ID of the Key Management Service (KMS) key that is used to encrypt the system disk.', example='0e478b7a-4262-4802-b8cb-00d3fb40****'),
    systemDiskPerformanceLevel?: string(name='system_disk_performance_level', description='The performance level (PL) of the system disk. This parameter takes effect only for an ESSD.

*   PL0: moderate maximum concurrent I/O performance and low I/O latency.
*   PL1: moderate maximum concurrent I/O performance and low I/O latency.
*   PL2: high maximum concurrent I/O performance and low I/O latency.
*   PL3: ultra-high maximum concurrent I/O performance and ultra-low I/O latency.

>  Disks support all of the preceding PLs. However, when you create a disk, the available PLs vary based on the ECS instance type that you selected. For more information, see [Overview of ECS instance families](https://help.aliyun.com/document_detail/25378.html).', example='PL1'),
    systemDiskProvisionedIops?: long(name='system_disk_provisioned_iops', description='The preset IOPS of the system disk. Valid values: 0 to min{50,000, 1,000 × Capacity - Baseline IOPS}. Baseline IOPS = min{1,800 + 50 × Capacity, 50,000}.

This parameter is supported only when `SystemDiskCategory` is set to `cloud_auto`. For more information, see [ESSD AutoPL disks](https://help.aliyun.com/document_detail/368372.html).', example='1000'),
    systemDiskSize?: long(name='system_disk_size', description='The size of the system disk. Unit: GiB.

Valid values: 20 to 20248.', example='120'),
    tags?: [ 
      {
        key?: string(name='key', description='The tag key.', example='node-k-1'),
        value?: string(name='value', description='The tag value.', example='node-v-1'),
      }
    ](name='tags', description='The tags that you want to add only to ECS instances.

The tag key must be unique and cannot exceed 128 characters in length. The tag key and value cannot start with aliyun or acs: or contain https:// or http://.'),
    vswitchIds?: [ string ](name='vswitch_ids', description='The vSwitch IDs. You can specify one to eight vSwitch IDs.

>  To ensure high availability, we recommend that you select vSwitches that reside in different zones.

This parameter is required.'),
  }(name='scaling_group', description='The configurations of the scaling group that is used by the node pool.'),
  teeConfig?: {
    teeEnable?: boolean(name='tee_enable', description='Specifies whether to enable confidential computing for the cluster.', example='true'),
  }(name='tee_config', description='The configurations of confidential computing for the cluster.'),
}

model CreateClusterNodePoolResponseBody = {
  nodepoolId?: string(name='nodepool_id', description='The node pool ID.', example='np31da1b38983f4511b490fc62108a****'),
  requestId?: string(name='request_id', description='The request ID.', example='0527ac9a-c899-4341-a21a-****'),
  taskId?: string(name='task_id', description='The ID of the task.', example='T-613b19bbd160ad492800****'),
}

model CreateClusterNodePoolResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateClusterNodePoolResponseBody(name='body'),
}

/**
 * @summary Creates a node pool for a Container Service for Kubernetes (ACK) cluster. You can use node pools to facilitate node management. For example, you can schedule, configure, or maintain nodes by node pool, and enable auto scaling for a node pool. We recommend that you use a managed node pool, which can help automate specific O\\\\\\&M tasks for nodes, such as Common Vulnerabilities and Exposures (CVE) patching and node repair. This reduces your O\\\\\\&M workload.
 *
 * @param request CreateClusterNodePoolRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateClusterNodePoolResponse
 */
async function createClusterNodePoolWithOptions(ClusterId: string, request: CreateClusterNodePoolRequest, headers: map[string]string, runtime: Util.RuntimeOptions): CreateClusterNodePoolResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.autoScaling)) {
    body['auto_scaling'] = request.autoScaling;
  }
  if (!Util.isUnset(request.count)) {
    body['count'] = request.count;
  }
  if (!Util.isUnset(request.hostNetwork)) {
    body['host_network'] = request.hostNetwork;
  }
  if (!Util.isUnset(request.interconnectConfig)) {
    body['interconnect_config'] = request.interconnectConfig;
  }
  if (!Util.isUnset(request.interconnectMode)) {
    body['interconnect_mode'] = request.interconnectMode;
  }
  if (!Util.isUnset(request.intranet)) {
    body['intranet'] = request.intranet;
  }
  if (!Util.isUnset(request.kubernetesConfig)) {
    body['kubernetes_config'] = request.kubernetesConfig;
  }
  if (!Util.isUnset(request.management)) {
    body['management'] = request.management;
  }
  if (!Util.isUnset(request.maxNodes)) {
    body['max_nodes'] = request.maxNodes;
  }
  if (!Util.isUnset(request.nodeConfig)) {
    body['node_config'] = request.nodeConfig;
  }
  if (!Util.isUnset(request.nodepoolInfo)) {
    body['nodepool_info'] = request.nodepoolInfo;
  }
  if (!Util.isUnset(request.scalingGroup)) {
    body['scaling_group'] = request.scalingGroup;
  }
  if (!Util.isUnset(request.teeConfig)) {
    body['tee_config'] = request.teeConfig;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateClusterNodePool',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/clusters/${OpenApiUtil.getEncodeParam(ClusterId)}/nodepools`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Creates a node pool for a Container Service for Kubernetes (ACK) cluster. You can use node pools to facilitate node management. For example, you can schedule, configure, or maintain nodes by node pool, and enable auto scaling for a node pool. We recommend that you use a managed node pool, which can help automate specific O\\\\\\&M tasks for nodes, such as Common Vulnerabilities and Exposures (CVE) patching and node repair. This reduces your O\\\\\\&M workload.
 *
 * @param request CreateClusterNodePoolRequest
 * @return CreateClusterNodePoolResponse
 */
async function createClusterNodePool(ClusterId: string, request: CreateClusterNodePoolRequest): CreateClusterNodePoolResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return createClusterNodePoolWithOptions(ClusterId, request, headers, runtime);
}

model CreateEdgeMachineRequest {
  hostname?: string(name='hostname', description='The `hostname` of the cloud-native box.

>  After the cloud-native box is activated, the `hostname` is automatically modified. The `hostname` is prefixed with the model and the prefix is followed by a random string.

This parameter is required.', example='ACK-B-B010-****'),
  model?: string(name='model', description='The model of the cloud-native box.

This parameter is required.', example='ACK-V-B010'),
  sn?: string(name='sn', description='The serial number of the cloud-native box.

This parameter is required.', example='Q2CB5XZAFBFG****'),
}

model CreateEdgeMachineResponseBody = {
  edgeMachineId?: string(name='edge_machine_id', description='The ID of the cloud-native box.', example='cc0725ddf688744979cd98445f67e****'),
  requestId?: string(name='request_id', description='The request ID.', example='"request_id": "6e7b377a-c5ed-4388-8026-689e1b34****",'),
}

model CreateEdgeMachineResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateEdgeMachineResponseBody(name='body'),
}

/**
 * @summary You can call the CreateEdgeMachine operation to activate a cloud-native box.
 *
 * @param request CreateEdgeMachineRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateEdgeMachineResponse
 */
async function createEdgeMachineWithOptions(request: CreateEdgeMachineRequest, headers: map[string]string, runtime: Util.RuntimeOptions): CreateEdgeMachineResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.hostname)) {
    body['hostname'] = request.hostname;
  }
  if (!Util.isUnset(request.model)) {
    body['model'] = request.model;
  }
  if (!Util.isUnset(request.sn)) {
    body['sn'] = request.sn;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateEdgeMachine',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/edge_machines`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary You can call the CreateEdgeMachine operation to activate a cloud-native box.
 *
 * @param request CreateEdgeMachineRequest
 * @return CreateEdgeMachineResponse
 */
async function createEdgeMachine(request: CreateEdgeMachineRequest): CreateEdgeMachineResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return createEdgeMachineWithOptions(request, headers, runtime);
}

model CreateKubernetesTriggerRequest {
  action?: string(name='action', description='The action that the trigger performs. Set the value to redeploy.

`redeploy`: redeploys the resources specified by `project_id`.

This parameter is required.', example='redeploy'),
  clusterId?: string(name='cluster_id', description='The cluster ID.

This parameter is required.', example='c5cdf7e3938bc4f8eb0e44b21a80f****'),
  projectId?: string(name='project_id', description='The name of the trigger project.

The name consists of the namespace where the application is deployed and the name of the application. The format is `${namespace}/${name}`.

Example: `default/test-app`.

This parameter is required.', example='default/test-app'),
  type?: string(name='type', description='The type of trigger. Valid values:

*   `deployment`: performs actions on Deployments.
*   `application`: performs actions on applications that are deployed in Application Center.

Default value: `deployment`.', example='deployment'),
}

model CreateKubernetesTriggerResponseBody = {
  action?: string(name='action', description='The action that the trigger performs. For example, a value of `redeploy` indicates that the trigger redeploys the application.', example='redeploy'),
  clusterId?: string(name='cluster_id', description='The ID of the cluster.', example='c5cdf7e3938bc4f8eb0e44b21a80f****'),
  id?: string(name='id', description='The ID of the trigger.', example='111'),
  projectId?: string(name='project_id', description='The name of the trigger project.', example='default/test-app'),
  type?: string(name='type', description='The type of trigger.

Valid values:

*   `deployment`: performs actions on Deployments.
*   `application`: performs actions on applications that are deployed in Application Center.', example='deployment'),
}

model CreateKubernetesTriggerResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateKubernetesTriggerResponseBody(name='body'),
}

/**
 * @deprecated OpenAPI CreateKubernetesTrigger is deprecated
 *
 * @summary You can call the CreateKubernetesTrigger operation to create a trigger for an application.
 *
 * @param request CreateKubernetesTriggerRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateKubernetesTriggerResponse
 */
// Deprecated
async function createKubernetesTriggerWithOptions(request: CreateKubernetesTriggerRequest, headers: map[string]string, runtime: Util.RuntimeOptions): CreateKubernetesTriggerResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.action)) {
    body['action'] = request.action;
  }
  if (!Util.isUnset(request.clusterId)) {
    body['cluster_id'] = request.clusterId;
  }
  if (!Util.isUnset(request.projectId)) {
    body['project_id'] = request.projectId;
  }
  if (!Util.isUnset(request.type)) {
    body['type'] = request.type;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateKubernetesTrigger',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/triggers`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @deprecated OpenAPI CreateKubernetesTrigger is deprecated
 *
 * @summary You can call the CreateKubernetesTrigger operation to create a trigger for an application.
 *
 * @param request CreateKubernetesTriggerRequest
 * @return CreateKubernetesTriggerResponse
 */
// Deprecated
async function createKubernetesTrigger(request: CreateKubernetesTriggerRequest): CreateKubernetesTriggerResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return createKubernetesTriggerWithOptions(request, headers, runtime);
}

model CreateTemplateRequest {
  description?: string(name='description', description='The description of the template.', example='this is test'),
  name?: string(name='name', description='The name of the orchestration template.

The name must be 1 to 63 characters in length, and can contain digits, letters, and hyphens (-). It cannot start with a hyphen (-).

This parameter is required.', example='service-account-template'),
  tags?: string(name='tags', description='The label of the template.', example='test'),
  template?: string(name='template', description='The template content in the YAML format.

This parameter is required.', example='apiVersion: v1\\\\nkind: ServiceAccount\\\\nmetadata:\\\\n  name: test-sa'),
  templateType?: string(name='template_type', description='The type of template. You can set the parameter to a custom value.

*   If the parameter is set to `kubernetes`, the template is displayed on the Templates page in the console.
*   If you set the parameter to `compose`, the template is not displayed in the console.

We recommend that you set the parameter to `kubernetes`.

Default value: `compose`.', example='kubernetes'),
}

model CreateTemplateResponseBody = {
  templateId?: string(name='template_id', description='The ID of the orchestration template.', example='ba1fe77b-b01e-4640-b77e-8f1b80e3e3cf'),
}

model CreateTemplateResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateTemplateResponseBody(name='body'),
}

/**
 * @summary Creates an orchestration template. An orchestration template defines and describes a group of Kubernetes resources. It declaratively describes the configuration of an application or how an application runs. You can use orchestration templates to manage resources in Kubernetes clusters and automate resource deployment, such as pods, Services, Deployments, ConfigMaps, and persistent volumes (PVs).
 *
 * @param request CreateTemplateRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateTemplateResponse
 */
async function createTemplateWithOptions(request: CreateTemplateRequest, headers: map[string]string, runtime: Util.RuntimeOptions): CreateTemplateResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.description)) {
    body['description'] = request.description;
  }
  if (!Util.isUnset(request.name)) {
    body['name'] = request.name;
  }
  if (!Util.isUnset(request.tags)) {
    body['tags'] = request.tags;
  }
  if (!Util.isUnset(request.template)) {
    body['template'] = request.template;
  }
  if (!Util.isUnset(request.templateType)) {
    body['template_type'] = request.templateType;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateTemplate',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/templates`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Creates an orchestration template. An orchestration template defines and describes a group of Kubernetes resources. It declaratively describes the configuration of an application or how an application runs. You can use orchestration templates to manage resources in Kubernetes clusters and automate resource deployment, such as pods, Services, Deployments, ConfigMaps, and persistent volumes (PVs).
 *
 * @param request CreateTemplateRequest
 * @return CreateTemplateResponse
 */
async function createTemplate(request: CreateTemplateRequest): CreateTemplateResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return createTemplateWithOptions(request, headers, runtime);
}

model CreateTriggerRequest {
  action?: string(name='action', description='The action that the trigger performs. Set the value to redeploy.

`redeploy`: redeploys the resources specified by `project_id`.

This parameter is required.', example='redeploy'),
  clusterId?: string(name='cluster_id', description='The cluster ID.

This parameter is required.', example='c5cdf7e3938bc4f8eb0e44b21a80f****'),
  projectId?: string(name='project_id', description='The name of the trigger project.

The name consists of the namespace where the application is deployed and the name of the application. The format is `${namespace}/${name}`.

Example: `default/test-app`.

This parameter is required.', example='default/test-app'),
  type?: string(name='type', description='The type of trigger. Valid values:

*   `deployment`: performs actions on Deployments.
*   `application`: performs actions on applications that are deployed in Application Center.

Default value: `deployment`.', example='deployment'),
}

model CreateTriggerResponseBody = {
  action?: string(name='action', description='The action that the trigger performs. For example, a value of `redeploy` indicates that the trigger redeploys the application.', example='redeploy'),
  clusterId?: string(name='cluster_id', description='The ID of the cluster.', example='c93095129fc41463aa455d89444fd****'),
  id?: string(name='id', description='The ID of the trigger.', example='102536'),
  projectId?: string(name='project_id', description='The name of the trigger project.', example='default/test-app'),
  type?: string(name='type', description='The type of trigger. Default value: deployment.', example='deployment'),
}

model CreateTriggerResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateTriggerResponseBody(name='body'),
}

/**
 * @summary Creates a trigger for an application to redeploy the application pods when specific conditions are met.
 *
 * @param request CreateTriggerRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateTriggerResponse
 */
async function createTriggerWithOptions(clusterId: string, request: CreateTriggerRequest, headers: map[string]string, runtime: Util.RuntimeOptions): CreateTriggerResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.action)) {
    body['action'] = request.action;
  }
  if (!Util.isUnset(request.clusterId)) {
    body['cluster_id'] = request.clusterId;
  }
  if (!Util.isUnset(request.projectId)) {
    body['project_id'] = request.projectId;
  }
  if (!Util.isUnset(request.type)) {
    body['type'] = request.type;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateTrigger',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/clusters/${OpenApiUtil.getEncodeParam(clusterId)}/triggers`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Creates a trigger for an application to redeploy the application pods when specific conditions are met.
 *
 * @param request CreateTriggerRequest
 * @return CreateTriggerResponse
 */
async function createTrigger(clusterId: string, request: CreateTriggerRequest): CreateTriggerResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return createTriggerWithOptions(clusterId, request, headers, runtime);
}

model DeleteAlertContactRequest {
  contactIds?: [ long ](name='contact_ids', description='The list of alert contact IDs.

This parameter is required.'),
}

model DeleteAlertContactShrinkRequest {
  contactIdsShrink?: string(name='contact_ids', description='The list of alert contact IDs.

This parameter is required.'),
}

model DeleteAlertContactResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: {
    result?: [ 
    {
      status?: boolean(name='status', description='The deletion status.

*   true: The alert contact was deleted.
*   false: The alert contact failed to be deleted.', example='true'),
      msg?: string(name='msg', description='The error message returned if the call fails.', example='Delete contact resource failed.'),
      contactId?: string(name='contact_id', description='An alert contact ID.', example='12345'),
    }
  ](name='result')
  }(name='body'),
}

/**
 * @summary Deletes one or more ACK alert contacts.
 *
 * @param tmpReq DeleteAlertContactRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteAlertContactResponse
 */
async function deleteAlertContactWithOptions(tmpReq: DeleteAlertContactRequest, headers: map[string]string, runtime: Util.RuntimeOptions): DeleteAlertContactResponse {
  Util.validateModel(tmpReq);
  var request = new DeleteAlertContactShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.contactIds)) {
    request.contactIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.contactIds, 'contact_ids', 'json');
  }
  var query : map[string]any = {};
  if (!Util.isUnset(request.contactIdsShrink)) {
    query['contact_ids'] = request.contactIdsShrink;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteAlertContact',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/alert/contacts`,
    method = 'DELETE',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'array',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Deletes one or more ACK alert contacts.
 *
 * @param request DeleteAlertContactRequest
 * @return DeleteAlertContactResponse
 */
async function deleteAlertContact(request: DeleteAlertContactRequest): DeleteAlertContactResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return deleteAlertContactWithOptions(request, headers, runtime);
}

model DeleteAlertContactGroupRequest {
  contactGroupIds?: [ long ](name='contact_group_ids', description='The list of alert contact group IDs.

This parameter is required.'),
}

model DeleteAlertContactGroupShrinkRequest {
  contactGroupIdsShrink?: string(name='contact_group_ids', description='The list of alert contact group IDs.

This parameter is required.'),
}

model DeleteAlertContactGroupResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: [ 
    {
      status?: boolean(name='status', description='The deletion status.

*   true: The alert contact group was deleted.
*   false: The alert contact group failed to be deleted.', example='true'),
      msg?: string(name='msg', description='The error message returned if the call fails.', example='Delete contact group resource failed.'),
      contactGroupId?: string(name='contact_group_id', description='The alert contact group ID.', example='12345'),
    }
  ](name='body'),
}

/**
 * @summary Deletes an ACK alert contact group.
 *
 * @param tmpReq DeleteAlertContactGroupRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteAlertContactGroupResponse
 */
async function deleteAlertContactGroupWithOptions(tmpReq: DeleteAlertContactGroupRequest, headers: map[string]string, runtime: Util.RuntimeOptions): DeleteAlertContactGroupResponse {
  Util.validateModel(tmpReq);
  var request = new DeleteAlertContactGroupShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.contactGroupIds)) {
    request.contactGroupIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.contactGroupIds, 'contact_group_ids', 'json');
  }
  var query : map[string]any = {};
  if (!Util.isUnset(request.contactGroupIdsShrink)) {
    query['contact_group_ids'] = request.contactGroupIdsShrink;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteAlertContactGroup',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/alert/contact_groups`,
    method = 'DELETE',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'array',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Deletes an ACK alert contact group.
 *
 * @param request DeleteAlertContactGroupRequest
 * @return DeleteAlertContactGroupResponse
 */
async function deleteAlertContactGroup(request: DeleteAlertContactGroupRequest): DeleteAlertContactGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return deleteAlertContactGroupWithOptions(request, headers, runtime);
}

model DeleteClusterRequest {
  deleteOptions?: [ 
    {
      deleteMode?: string(name='delete_mode', description='The deletion policy for the specified type of resource. Valid values:

*   delete: deletes the specified type of resource.
*   retain: retains the specified type of resource.', example='delete'),
      resourceType?: string(name='resource_type', description='The type of the resource. Valid values:

*   SLB: SLB resources created for Services. By default, the SLB resources are automatically deleted.
*   ALB: Application Load Balancer (ALB) resources created by the ALB Ingress controller. By default, the ALB resources are retained.
*   SLS_Data: Simple Log Service projects used by the cluster logging feature. By default, the Simple Log Service projects are retained.
*   SLS_ControlPlane: Simple Log Service projects used to store the logs of control planes in ACK managed clusters. By default, the Simple Log Service projects are retained.
*   PrivateZone: PrivateZone resources created by ACK Serverless clusters. By default, the PrivateZone resources are retained.', example='SLS_Data'),
    }
  ](name='delete_options', description='The type of cluster resource that you want to delete or retain.'),
  keepSlb?: boolean(name='keep_slb', description='Specifies whether to retain the Server Load Balancer (SLB) resources that are created by the cluster.

*   `true`: retains the SLB instances that are created by the cluster.
*   `false`: does not retain the SLB instances that are created by the cluster.

Default value: `false`. Set resource_type to `SLB` in the `delete_options` parameter to manage SLB instances.', example='false', deprecated=true),
  retainAllResources?: boolean(name='retain_all_resources', description='Specifies whether to retain all resources. If you set the parameter to `true`, the `retain_resources` parameter is ignored. The cloud resources that are created by the cluster are retained. You can call the `DescribeClusterResources` operation to query cloud resources created by the cluster. If you set the parameter to `false`, resources to be retained by default in the `delete_options` parameter are still retained. To delete these resources, set `delete_mode` to `delete` in `delete_options`.

*   `true`: retains all resources, including cloud resources created by the cluster.
*   `false`: does not retain all resources. Resources to be retained by default in the `delete_options` parameter are retained. For example, `ALB` instances are retained when this parameter is set to `false`.

Default value: `false`.', example='false'),
  retainResources?: [ string ](name='retain_resources', description='The list of resources. To retain resources when you delete a cluster, you need to specify the IDs of the resources to be retained.'),
}

model DeleteClusterShrinkRequest {
  deleteOptionsShrink?: string(name='delete_options', description='The type of cluster resource that you want to delete or retain.'),
  keepSlb?: boolean(name='keep_slb', description='Specifies whether to retain the Server Load Balancer (SLB) resources that are created by the cluster.

*   `true`: retains the SLB instances that are created by the cluster.
*   `false`: does not retain the SLB instances that are created by the cluster.

Default value: `false`. Set resource_type to `SLB` in the `delete_options` parameter to manage SLB instances.', example='false', deprecated=true),
  retainAllResources?: boolean(name='retain_all_resources', description='Specifies whether to retain all resources. If you set the parameter to `true`, the `retain_resources` parameter is ignored. The cloud resources that are created by the cluster are retained. You can call the `DescribeClusterResources` operation to query cloud resources created by the cluster. If you set the parameter to `false`, resources to be retained by default in the `delete_options` parameter are still retained. To delete these resources, set `delete_mode` to `delete` in `delete_options`.

*   `true`: retains all resources, including cloud resources created by the cluster.
*   `false`: does not retain all resources. Resources to be retained by default in the `delete_options` parameter are retained. For example, `ALB` instances are retained when this parameter is set to `false`.

Default value: `false`.', example='false'),
  retainResourcesShrink?: string(name='retain_resources', description='The list of resources. To retain resources when you delete a cluster, you need to specify the IDs of the resources to be retained.'),
}

model DeleteClusterResponseBody = {
  clusterId?: string(name='cluster_id', description='The ID of the cluster.', example='cb95aa626a47740afbf6aa099b650****'),
  requestId?: string(name='request_id', description='The request ID.', example='687C5BAA-D103-4993-884B-C35E4314****'),
  taskId?: string(name='task_id', description='The ID of the task.', example='T-5a54309c80282e39ea****'),
}

model DeleteClusterResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteClusterResponseBody(name='body'),
}

/**
 * @summary You can call the DeleteCluster operation to delete a cluster and specify whether to delete or retain the relevant cluster resources. Before you delete a cluster, you must manually delete workloads in the cluster, such as Deployments, StatefulSets, Jobs, and CronJobs. Otherwise, you may fail to delete the cluster.
 *
 * @description Warning:
 * *   Subscription ECS instances and Lingjun nodes in a cluster cannot be automatically released. To avoid unnecessary costs, we recommend that you manually release the resources. For more information, see \\<a href="{0}" target="_blank">Rules for deleting clusters and releasing nodes\\</a>.
 * *   If the SLB instance of the API server uses the subscription billing method, it cannot be automatically released. To avoid unnecessary costs, we recommend that you manually release it.
 * *   By default, virtual private clouds (VPCs), vSwitches, security groups, and RAM roles are retained if they are used by other resources. To avoid unnecessary costs, we recommend that you manually release the resources.
 * *   Elastic container instances created on virtual nodes are automatically released.
 * *   Some resources created together with a cluster are not automatically released when the cluster is deleted. After the cluster is deleted, you are still charged for the resources. Release or retain the resources based on your actual needs. The resources include Simple Log Service projects automatically created by the cluster and dynamically provisioned disks.
 *
 * @param tmpReq DeleteClusterRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteClusterResponse
 */
async function deleteClusterWithOptions(ClusterId: string, tmpReq: DeleteClusterRequest, headers: map[string]string, runtime: Util.RuntimeOptions): DeleteClusterResponse {
  Util.validateModel(tmpReq);
  var request = new DeleteClusterShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.deleteOptions)) {
    request.deleteOptionsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.deleteOptions, 'delete_options', 'json');
  }
  if (!Util.isUnset(tmpReq.retainResources)) {
    request.retainResourcesShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.retainResources, 'retain_resources', 'json');
  }
  var query : map[string]any = {};
  if (!Util.isUnset(request.deleteOptionsShrink)) {
    query['delete_options'] = request.deleteOptionsShrink;
  }
  if (!Util.isUnset(request.keepSlb)) {
    query['keep_slb'] = request.keepSlb;
  }
  if (!Util.isUnset(request.retainAllResources)) {
    query['retain_all_resources'] = request.retainAllResources;
  }
  if (!Util.isUnset(request.retainResourcesShrink)) {
    query['retain_resources'] = request.retainResourcesShrink;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteCluster',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/clusters/${OpenApiUtil.getEncodeParam(ClusterId)}`,
    method = 'DELETE',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary You can call the DeleteCluster operation to delete a cluster and specify whether to delete or retain the relevant cluster resources. Before you delete a cluster, you must manually delete workloads in the cluster, such as Deployments, StatefulSets, Jobs, and CronJobs. Otherwise, you may fail to delete the cluster.
 *
 * @description Warning:
 * *   Subscription ECS instances and Lingjun nodes in a cluster cannot be automatically released. To avoid unnecessary costs, we recommend that you manually release the resources. For more information, see \\<a href="{0}" target="_blank">Rules for deleting clusters and releasing nodes\\</a>.
 * *   If the SLB instance of the API server uses the subscription billing method, it cannot be automatically released. To avoid unnecessary costs, we recommend that you manually release it.
 * *   By default, virtual private clouds (VPCs), vSwitches, security groups, and RAM roles are retained if they are used by other resources. To avoid unnecessary costs, we recommend that you manually release the resources.
 * *   Elastic container instances created on virtual nodes are automatically released.
 * *   Some resources created together with a cluster are not automatically released when the cluster is deleted. After the cluster is deleted, you are still charged for the resources. Release or retain the resources based on your actual needs. The resources include Simple Log Service projects automatically created by the cluster and dynamically provisioned disks.
 *
 * @param request DeleteClusterRequest
 * @return DeleteClusterResponse
 */
async function deleteCluster(ClusterId: string, request: DeleteClusterRequest): DeleteClusterResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return deleteClusterWithOptions(ClusterId, request, headers, runtime);
}

model DeleteClusterNodepoolRequest {
  force?: boolean(name='force', description='Specifies whether to forcefully delete the node pool.', example='false'),
}

model DeleteClusterNodepoolResponseBody = {
  requestId?: string(name='request_id', description='The request ID.', example='7263C978-3DBD-4E06-B319-793B38A2F388'),
  taskId?: string(name='task_id', description='task IDs', example='T-655ace947e0e6603af000004'),
}

model DeleteClusterNodepoolResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteClusterNodepoolResponseBody(name='body'),
}

/**
 * @summary null
 *
 * @param request DeleteClusterNodepoolRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteClusterNodepoolResponse
 */
async function deleteClusterNodepoolWithOptions(ClusterId: string, NodepoolId: string, request: DeleteClusterNodepoolRequest, headers: map[string]string, runtime: Util.RuntimeOptions): DeleteClusterNodepoolResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.force)) {
    query['force'] = request.force;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteClusterNodepool',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/clusters/${OpenApiUtil.getEncodeParam(ClusterId)}/nodepools/${OpenApiUtil.getEncodeParam(NodepoolId)}`,
    method = 'DELETE',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary null
 *
 * @param request DeleteClusterNodepoolRequest
 * @return DeleteClusterNodepoolResponse
 */
async function deleteClusterNodepool(ClusterId: string, NodepoolId: string, request: DeleteClusterNodepoolRequest): DeleteClusterNodepoolResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return deleteClusterNodepoolWithOptions(ClusterId, NodepoolId, request, headers, runtime);
}

model DeleteClusterNodesRequest {
  drainNode?: boolean(name='drain_node', description='Specifies whether to remove all pods from the nodes that you want to remove. Valid values:

*   `true`: removes all pods from the nodes that you want to remove.
*   `false`: does not remove pods from the nodes that you want to remove.

Default value: `false`.', example='true'),
  nodes?: [ string ](name='nodes', description='The list of nodes to be removed. You need to specify the name of the nodes used in the cluster, for example, `cn-hangzhou.192.168.0.70`.

This parameter is required.'),
  releaseNode?: boolean(name='release_node', description='Specifies whether to release the Elastic Compute Service (ECS) instances. Valid values:

*   `true`: releases the ECS instances.
*   `false`: does not release the ECS instances.

Default value: `false`.

>  You cannot release subscription ECS instances.', example='true'),
}

model DeleteClusterNodesResponseBody = {
  clusterId?: string(name='cluster_id', description='The cluster ID.', example='c104d5d5f301c4e2a8ee578c37bc****'),
  requestId?: string(name='request_id', description='The request ID.', example='A9891419-D125-4D89-AFCA-68846675E2F7'),
  taskId?: string(name='task_id', description='The task ID.', example='T-60fea8ad2e277f0879000ae9'),
}

model DeleteClusterNodesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteClusterNodesResponseBody(name='body'),
}

/**
 * @summary Removes nodes from a Container Service for Kubernetes (ACK) cluster. When you remove nodes, you can specify whether to release the Elastic Compute Service (ECS) instances and drain the nodes. When you remove nodes, pods on the nodes are migrated. This may adversely affect your businesses. We recommend that you back up data and perform this operation during off-peak hours.
 *
 * @description *   When you remove a node, the pods that run on the node are migrated to other nodes. This may cause service interruptions. We recommend that you remove nodes during off-peak hours.
 * *   The operation may have unexpected risks. Back up the data before you perform this operation.
 * *   When you remove a node, the system sets the status of the node to Unschedulable.
 *
 * @param request DeleteClusterNodesRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteClusterNodesResponse
 */
async function deleteClusterNodesWithOptions(ClusterId: string, request: DeleteClusterNodesRequest, headers: map[string]string, runtime: Util.RuntimeOptions): DeleteClusterNodesResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.drainNode)) {
    body['drain_node'] = request.drainNode;
  }
  if (!Util.isUnset(request.nodes)) {
    body['nodes'] = request.nodes;
  }
  if (!Util.isUnset(request.releaseNode)) {
    body['release_node'] = request.releaseNode;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteClusterNodes',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/clusters/${OpenApiUtil.getEncodeParam(ClusterId)}/nodes`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Removes nodes from a Container Service for Kubernetes (ACK) cluster. When you remove nodes, you can specify whether to release the Elastic Compute Service (ECS) instances and drain the nodes. When you remove nodes, pods on the nodes are migrated. This may adversely affect your businesses. We recommend that you back up data and perform this operation during off-peak hours.
 *
 * @description *   When you remove a node, the pods that run on the node are migrated to other nodes. This may cause service interruptions. We recommend that you remove nodes during off-peak hours.
 * *   The operation may have unexpected risks. Back up the data before you perform this operation.
 * *   When you remove a node, the system sets the status of the node to Unschedulable.
 *
 * @param request DeleteClusterNodesRequest
 * @return DeleteClusterNodesResponse
 */
async function deleteClusterNodes(ClusterId: string, request: DeleteClusterNodesRequest): DeleteClusterNodesResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return deleteClusterNodesWithOptions(ClusterId, request, headers, runtime);
}

model DeleteEdgeMachineRequest {
  force?: string(name='force', description='Specifies whether to forcefully delete the cloud-native box. Valid values:

*   `true`: forcefully deletes the cloud-native box.
*   `false`: does not forcefully delete the cloud-native box.

Default value: `false`.', example='true/false'),
}

model DeleteEdgeMachineResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
}

/**
 * @summary You can call the DeleteEdgeMachine operation to delete a cloud-native box.
 *
 * @param request DeleteEdgeMachineRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteEdgeMachineResponse
 */
async function deleteEdgeMachineWithOptions(edgeMachineid: string, request: DeleteEdgeMachineRequest, headers: map[string]string, runtime: Util.RuntimeOptions): DeleteEdgeMachineResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.force)) {
    query['force'] = request.force;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteEdgeMachine',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/edge_machines/%5Bedge_machineid%5D`,
    method = 'DELETE',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'none',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary You can call the DeleteEdgeMachine operation to delete a cloud-native box.
 *
 * @param request DeleteEdgeMachineRequest
 * @return DeleteEdgeMachineResponse
 */
async function deleteEdgeMachine(edgeMachineid: string, request: DeleteEdgeMachineRequest): DeleteEdgeMachineResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return deleteEdgeMachineWithOptions(edgeMachineid, request, headers, runtime);
}

model DeleteKubernetesTriggerResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
}

/**
 * @deprecated OpenAPI DeleteKubernetesTrigger is deprecated
 *
 * @summary You can call the DeleteKubernetesTrigger operation to delete an application trigger by trigger ID
 *
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteKubernetesTriggerResponse
 */
// Deprecated
async function deleteKubernetesTriggerWithOptions(Id: string, headers: map[string]string, runtime: Util.RuntimeOptions): DeleteKubernetesTriggerResponse {
  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
  };
  var params = new OpenApi.Params{
    action = 'DeleteKubernetesTrigger',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/triggers/revoke/${OpenApiUtil.getEncodeParam(Id)}`,
    method = 'DELETE',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'none',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @deprecated OpenAPI DeleteKubernetesTrigger is deprecated
 *
 * @summary You can call the DeleteKubernetesTrigger operation to delete an application trigger by trigger ID
 *
 * @return DeleteKubernetesTriggerResponse
 */
// Deprecated
async function deleteKubernetesTrigger(Id: string): DeleteKubernetesTriggerResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return deleteKubernetesTriggerWithOptions(Id, headers, runtime);
}

model DeletePolicyInstanceRequest {
  instanceName?: string(name='instance_name', description='The ID of the policy instance.', example='allowed-repos-mqdsf'),
}

model DeletePolicyInstanceResponseBody = {
  instances?: [ string ](name='instances', description='A list of policy instances.'),
}

model DeletePolicyInstanceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeletePolicyInstanceResponseBody(name='body'),
}

/**
 * @summary Deletes policy instances in a Container Service for Kubernetes (ACK) cluster.
 *
 * @param request DeletePolicyInstanceRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeletePolicyInstanceResponse
 */
async function deletePolicyInstanceWithOptions(clusterId: string, policyName: string, request: DeletePolicyInstanceRequest, headers: map[string]string, runtime: Util.RuntimeOptions): DeletePolicyInstanceResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.instanceName)) {
    query['instance_name'] = request.instanceName;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeletePolicyInstance',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/clusters/${OpenApiUtil.getEncodeParam(clusterId)}/policies/${OpenApiUtil.getEncodeParam(policyName)}`,
    method = 'DELETE',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Deletes policy instances in a Container Service for Kubernetes (ACK) cluster.
 *
 * @param request DeletePolicyInstanceRequest
 * @return DeletePolicyInstanceResponse
 */
async function deletePolicyInstance(clusterId: string, policyName: string, request: DeletePolicyInstanceRequest): DeletePolicyInstanceResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return deletePolicyInstanceWithOptions(clusterId, policyName, request, headers, runtime);
}

model DeleteTemplateResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
}

/**
 * @summary Deletes the orchestration templates that you no longer need.
 *
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteTemplateResponse
 */
async function deleteTemplateWithOptions(TemplateId: string, headers: map[string]string, runtime: Util.RuntimeOptions): DeleteTemplateResponse {
  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
  };
  var params = new OpenApi.Params{
    action = 'DeleteTemplate',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/templates/${OpenApiUtil.getEncodeParam(TemplateId)}`,
    method = 'DELETE',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'none',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Deletes the orchestration templates that you no longer need.
 *
 * @return DeleteTemplateResponse
 */
async function deleteTemplate(TemplateId: string): DeleteTemplateResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return deleteTemplateWithOptions(TemplateId, headers, runtime);
}

model DeleteTriggerResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
}

/**
 * @summary Deletes an application trigger.
 *
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteTriggerResponse
 */
async function deleteTriggerWithOptions(clusterId: string, Id: string, headers: map[string]string, runtime: Util.RuntimeOptions): DeleteTriggerResponse {
  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
  };
  var params = new OpenApi.Params{
    action = 'DeleteTrigger',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/clusters/${OpenApiUtil.getEncodeParam(clusterId)}/triggers/${OpenApiUtil.getEncodeParam(Id)}`,
    method = 'DELETE',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'none',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Deletes an application trigger.
 *
 * @return DeleteTriggerResponse
 */
async function deleteTrigger(clusterId: string, Id: string): DeleteTriggerResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return deleteTriggerWithOptions(clusterId, Id, headers, runtime);
}

model DeployPolicyInstanceRequest {
  action?: string(name='action', description='The action of the policy. Valid values:

*   `deny`: Deployments that match the policy are denied.
*   `warn`: Alerts are generated for Deployments that match the policy.', example='deny'),
  namespaces?: [ string ](name='namespaces', description='The namespaces to which the policy applies. If you leave this parameter empty, the policy is applicable to all namespaces of the cluster.'),
  parameters?: map[string]any(name='parameters', description='The parameter settings of the policy. For more information about the parameters supported by each policy, see [Predefined security policies of ACK](https://www.alibabacloud.com/help/doc-detail/359819.html).', example='{"restrictedNamespaces": [ "test" ]}'),
}

model DeployPolicyInstanceResponseBody = {
  instances?: [ string ](name='instances', description='A list of policy instances.'),
}

model DeployPolicyInstanceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeployPolicyInstanceResponseBody(name='body'),
}

/**
 * @summary Deploys a policy in the specified namespaces of a specific Container Service for Kubernetes (ACK) cluster. You can create and deploy a security policy by specifying the policy type, action of the policy such as alerting or denying, and namespaces to which the policy applies.
 *
 * @param request DeployPolicyInstanceRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeployPolicyInstanceResponse
 */
async function deployPolicyInstanceWithOptions(clusterId: string, policyName: string, request: DeployPolicyInstanceRequest, headers: map[string]string, runtime: Util.RuntimeOptions): DeployPolicyInstanceResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.action)) {
    body['action'] = request.action;
  }
  if (!Util.isUnset(request.namespaces)) {
    body['namespaces'] = request.namespaces;
  }
  if (!Util.isUnset(request.parameters)) {
    body['parameters'] = request.parameters;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeployPolicyInstance',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/clusters/${OpenApiUtil.getEncodeParam(clusterId)}/policies/${OpenApiUtil.getEncodeParam(policyName)}`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Deploys a policy in the specified namespaces of a specific Container Service for Kubernetes (ACK) cluster. You can create and deploy a security policy by specifying the policy type, action of the policy such as alerting or denying, and namespaces to which the policy applies.
 *
 * @param request DeployPolicyInstanceRequest
 * @return DeployPolicyInstanceResponse
 */
async function deployPolicyInstance(clusterId: string, policyName: string, request: DeployPolicyInstanceRequest): DeployPolicyInstanceResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return deployPolicyInstanceWithOptions(clusterId, policyName, request, headers, runtime);
}

model DescribeAddonRequest {
  clusterId?: string(name='cluster_id', description='The ID of the cluster. If you specify a cluster ID, only components used in the cluster are queried. Other parameters are ignored.', example='c02b3e03be10643e8a644a843ffcb****'),
  clusterSpec?: string(name='cluster_spec', description='The specifications of the cluster. If cluster_id is specified, this parameter is ignored. You must specify the region_id, cluster_type, profile, cluster_spec, and cluster_version parameters at the same time.', example='ack.pro.small'),
  clusterType?: string(name='cluster_type', description='The type of the cluster. If cluster_id is specified, this parameter is ignored. You must specify the region_id, cluster_type, profile, cluster_spec, and cluster_version parameters at the same time.', example='ManagedKubernetes'),
  clusterVersion?: string(name='cluster_version', description='The version of the cluster. If cluster_id is specified, this parameter is ignored. You must specify the region_id, cluster_type, profile, cluster_spec, and cluster_version parameters at the same time.', example='1.26.3-aliyun.1'),
  profile?: string(name='profile', description='The subtype of the cluster. If cluster_id is specified, this parameter is ignored. You must specify the region_id, cluster_type, profile, cluster_spec, and cluster_version parameters at the same time.', example='Default'),
  regionId?: string(name='region_id', description='The region ID. If cluster_id is specified, this parameter is ignored. You must specify the region_id, cluster_type, profile, cluster_spec, and cluster_version parameters at the same time.', example='cn-hangzhou'),
  version?: string(name='version', description='The version of the component. If you do not specify this parameter, the latest version of the component is queried.', example='v1.9.3.10-7dfca203-aliyun'),
}

model DescribeAddonResponseBody = {
  architecture?: [ string ](name='architecture', description='Architectures supported by the component. Valid values:

*   amd64
*   arm64'),
  category?: string(name='category', description='The category of the component.', example='network'),
  configSchema?: string(name='config_schema', description='The custom parameter schema of the component.', example='{}'),
  installByDefault?: boolean(name='install_by_default', description='Indicates whether the component is automatically installed by default.', example='true'),
  managed?: boolean(name='managed', description='Indicates whether the component is fully managed.', example='false'),
  name?: string(name='name', description='The name of the component.', example='coredns'),
  newerVersions?: [ 
    {
      minimumClusterVersion?: string(name='minimum_cluster_version', description='The minimum cluster version required by the component version.', example='1.20.4'),
      upgradable?: boolean(name='upgradable', description='Indicates whether the component can be updated to the version.', example='true'),
      version?: string(name='version', description='The version number.', example='v1.9.3.10-7dfca203-aliyun'),
    }
  ](name='newer_versions', description='The latest version of the component.'),
  supportedActions?: [ string ](name='supported_actions', description='Operations supported by the component. Valid values:

*   Install
*   Upgrade
*   Modify
*   Uninstall'),
  version?: string(name='version', description='The version of the component.', example='v1.9.3.6-32932850-aliyun'),
}

model DescribeAddonResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAddonResponseBody(name='body'),
}

/**
 * @summary Queries the information about a component based on specific conditions such as the region, cluster type, cluster subtype defined by cluster profile, cluster version, and component name. The information includes whether the component is managed, the component type, supported custom parameter schema, compatible operating system architecture, and earliest supported cluster version.
 *
 * @param request DescribeAddonRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAddonResponse
 */
async function describeAddonWithOptions(addonName: string, request: DescribeAddonRequest, headers: map[string]string, runtime: Util.RuntimeOptions): DescribeAddonResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.clusterId)) {
    query['cluster_id'] = request.clusterId;
  }
  if (!Util.isUnset(request.clusterSpec)) {
    query['cluster_spec'] = request.clusterSpec;
  }
  if (!Util.isUnset(request.clusterType)) {
    query['cluster_type'] = request.clusterType;
  }
  if (!Util.isUnset(request.clusterVersion)) {
    query['cluster_version'] = request.clusterVersion;
  }
  if (!Util.isUnset(request.profile)) {
    query['profile'] = request.profile;
  }
  if (!Util.isUnset(request.regionId)) {
    query['region_id'] = request.regionId;
  }
  if (!Util.isUnset(request.version)) {
    query['version'] = request.version;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAddon',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/addons/${OpenApiUtil.getEncodeParam(addonName)}`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Queries the information about a component based on specific conditions such as the region, cluster type, cluster subtype defined by cluster profile, cluster version, and component name. The information includes whether the component is managed, the component type, supported custom parameter schema, compatible operating system architecture, and earliest supported cluster version.
 *
 * @param request DescribeAddonRequest
 * @return DescribeAddonResponse
 */
async function describeAddon(addonName: string, request: DescribeAddonRequest): DescribeAddonResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return describeAddonWithOptions(addonName, request, headers, runtime);
}

model DescribeAddonsRequest {
  clusterProfile?: string(name='cluster_profile', description='The cluster type. Valid values:

*   `Default`: ACK managed cluster
*   `Serverless`: ACK Serverless cluster
*   `Edge`: ACK Edge cluster', example='Default'),
  clusterSpec?: string(name='cluster_spec', description='If you set `cluster_type` to `ManagedKubernetes` and specify `profile`, you can further specify the edition of the cluster. Valid values:

*   `ack.pro.small`: creates an ACK Pro cluster.
*   `ack.standard`: creates an ACK Basic cluster. If you leave the parameter empty, an ACK Basic cluster is created.', example='ack.pro.small'),
  clusterType?: string(name='cluster_type', description='*   `Kubernetes`: ACK dedicated cluster.
*   `ManagedKubernetes`: ACK managed cluster. ACK managed clusters include ACK Basic clusters, ACK Pro clusters, ACK Serverless Basic clusters, ACK Serverless Pro clusters, ACK Edge Basic clusters, ACK Edge Pro clusters, and ACK Lingjun Pro clusters.
*   `ExternalKubernetes`: registered cluster.', example='kubernetes'),
  clusterVersion?: string(name='cluster_version', description='The cluster version.', example='1.24.6-aliyun.1'),
  region?: string(name='region', description='The region ID of the cluster.

This parameter is required.', example='cn-beijing'),
}

model DescribeAddonsResponseBody = {
  componentGroups?: [ 
    {
      groupName?: string(name='group_name', description='The name of the component group.', example='storage'),
      items?: [ 
        {
          name?: string(name='name', description='The name of the component.', example='flexvolume'),
        }
      ](name='items', description='The names of the components in the component group.'),
    }
  ](name='ComponentGroups', description='The list of the returned components.'),
  standardComponents?: map[string]StandardComponentsValue(name='StandardComponents', description='Standard components.'),
}

model DescribeAddonsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAddonsResponseBody(name='body'),
}

/**
 * @deprecated OpenAPI DescribeAddons is deprecated
 *
 * @summary You can call the DescribeAddons operation to query the details about all components that are supported by Container Service for Kubernetes (ACK).
 *
 * @param request DescribeAddonsRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAddonsResponse
 */
// Deprecated
async function describeAddonsWithOptions(request: DescribeAddonsRequest, headers: map[string]string, runtime: Util.RuntimeOptions): DescribeAddonsResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.clusterProfile)) {
    query['cluster_profile'] = request.clusterProfile;
  }
  if (!Util.isUnset(request.clusterSpec)) {
    query['cluster_spec'] = request.clusterSpec;
  }
  if (!Util.isUnset(request.clusterType)) {
    query['cluster_type'] = request.clusterType;
  }
  if (!Util.isUnset(request.clusterVersion)) {
    query['cluster_version'] = request.clusterVersion;
  }
  if (!Util.isUnset(request.region)) {
    query['region'] = request.region;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAddons',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/clusters/components/metadata`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @deprecated OpenAPI DescribeAddons is deprecated
 *
 * @summary You can call the DescribeAddons operation to query the details about all components that are supported by Container Service for Kubernetes (ACK).
 *
 * @param request DescribeAddonsRequest
 * @return DescribeAddonsResponse
 */
// Deprecated
async function describeAddons(request: DescribeAddonsRequest): DescribeAddonsResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return describeAddonsWithOptions(request, headers, runtime);
}

model DescribeClusterAddonInstanceResponseBody = {
  config?: string(name='config', description='The configuration of the component.', example='{"NetworkPolicy":"true"}'),
  name?: string(name='name', description='The name of the component.', example='terway-eniip'),
  state?: string(name='state', description='The status of the component. Valid values:

*   initial: The component is being installed.
*   active: The component has been installed.
*   unhealthy: The component is in an abnormal state.
*   upgrading: The component is undergoing an upgrade.
*   updating: Component configuration changes are being applied.
*   deleting: The component is being uninstalled.
*   deleted: The component has been deleted.', example='active'),
  version?: string(name='version', description='The version of the component.', example='v1.4.3'),
}

model DescribeClusterAddonInstanceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeClusterAddonInstanceResponseBody(name='body'),
}

/**
 * @deprecated OpenAPI DescribeClusterAddonInstance is deprecated
 *
 * @summary You can call the DescribeClusterAddonInstance operation to query the information about a cluster component, including the version, status, and configuration of the component.
 *
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeClusterAddonInstanceResponse
 */
// Deprecated
async function describeClusterAddonInstanceWithOptions(ClusterID: string, AddonName: string, headers: map[string]string, runtime: Util.RuntimeOptions): DescribeClusterAddonInstanceResponse {
  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
  };
  var params = new OpenApi.Params{
    action = 'DescribeClusterAddonInstance',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/clusters/${OpenApiUtil.getEncodeParam(ClusterID)}/components/${OpenApiUtil.getEncodeParam(AddonName)}/instance`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @deprecated OpenAPI DescribeClusterAddonInstance is deprecated
 *
 * @summary You can call the DescribeClusterAddonInstance operation to query the information about a cluster component, including the version, status, and configuration of the component.
 *
 * @return DescribeClusterAddonInstanceResponse
 */
// Deprecated
async function describeClusterAddonInstance(ClusterID: string, AddonName: string): DescribeClusterAddonInstanceResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return describeClusterAddonInstanceWithOptions(ClusterID, AddonName, headers, runtime);
}

model DescribeClusterAddonMetadataRequest {
  version?: string(name='version'),
}

model DescribeClusterAddonMetadataResponseBody = {
  configSchema?: string(name='config_schema', description='The component schema parameters.', example='{\\\\n  \\\\"$schema\\\\": \\\\"https://json-schema.org/draft-07/schema#\\\\",\\\\n  \\\\"properties\\\\": {\\\\n    \\\\"controller\\\\": {\\\\n      \\\\"description\\\\": \\\\"\\\\",\\\\n      \\\\"properties\\\\": {\\\\n        \\\\"resources\\\\": {\\\\n          \\\\"properties\\\\": {\\\\n            \\\\"armsPrometheusOperator\\\\": {\\\\n              \\\\"properties\\\\": {\\\\n                \\\\"resources\\\\": {\\\\n                  \\\\"properties\\\\": {\\\\n                    \\\\"limits\\\\": {\\\\n                      \\\\"properties\\\\": {\\\\n                        \\\\"memory\\\\": {\\\\n                          \\\\"description\\\\": \\\\"memory limit of arms prometheus operator\\\\",\\\\n                          \\\\"type\\\\": \\\\"string\\\\",\\\\n                          \\\\"pattern\\\\": \\\\"^[1-9][0-9]*(\\\\\\\\\\\\\\\\.\\\\\\\\\\\\\\\\d+)?(K|Ki|M|Mi|G|Gi|T|Ti)?$\\\\",\\\\n                          \\\\"default\\\\": \\\\"500m\\\\",\\\\n                          \\\\"x-ui-description\\\\": \\\\"<mds-key>\\\\",\\\\n                          \\\\"x-ui-prompt-message\\\\": \\\\"<mds-key>\\\\",\\\\n                          \\\\"x-ui-validation-message\\\\": \\\\"<mds-key>\\\\",\\\\n                          \\\\"x-ui-additional-tips\\\\": \\\\"<mds-key>\\\\"\\\\n                        },\\\\n                        \\\\"cpu\\\\": {\\\\n                          \\\\"description\\\\": \\\\"cpu limit of arms prometheus operator\\\\",\\\\n                          \\\\"type\\\\": \\\\"string\\\\",\\\\n                          \\\\"pattern\\\\": \\\\"^[1-9][0-9]*(m|\\\\\\\\\\\\\\\\.\\\\\\\\\\\\\\\\d+)?$\\\\",\\\\n                          \\\\"default\\\\": \\\\"1.0\\\\",\\\\n                          \\\\"x-ui-description\\\\": \\\\"<mds-key>\\\\",\\\\n                          \\\\"x-ui-validation-message\\\\": \\\\"<mds-key>\\\\"\\\\n                        }\\\\n                      },\\\\n                      \\\\"type\\\\": \\\\"object\\\\",\\\\n                      \\\\"additionalProperties\\\\": false\\\\n                    },\\\\n                    \\\\"requests\\\\": {\\\\n                      \\\\"properties\\\\": {\\\\n                        \\\\"memory\\\\": {\\\\n                          \\\\"description\\\\": \\\\"memory request of arms prometheus operator\\\\",\\\\n                          \\\\"type\\\\": \\\\"string\\\\",\\\\n                          \\\\"pattern\\\\": \\\\"^[1-9][0-9]*(\\\\\\\\\\\\\\\\.\\\\\\\\\\\\\\\\d+)?(K|Ki|M|Mi|G|Gi|T|Ti)?$\\\\",\\\\n                          \\\\"default\\\\": \\\\"500m\\\\",\\\\n                          \\\\"x-ui-description\\\\": \\\\"<mds-key>\\\\",\\\\n                          \\\\"x-ui-validation-message\\\\": \\\\"<mds-key>\\\\"\\\\n                        },\\\\n                        \\\\"cpu\\\\": {\\\\n                          \\\\"description\\\\": \\\\"cpu request of arms prometheus operator\\\\",\\\\n                          \\\\"type\\\\": \\\\"string\\\\",\\\\n                          \\\\"pattern\\\\": \\\\"^[1-9][0-9]*(m|\\\\\\\\\\\\\\\\.\\\\\\\\\\\\\\\\d+)?$\\\\",\\\\n                          \\\\"default\\\\": \\\\"1.0\\\\",\\\\n                          \\\\"x-ui-description\\\\": \\\\"<mds-key>\\\\",\\\\n                          \\\\"x-ui-validation-message\\\\": \\\\"<mds-key>\\\\"\\\\n                        }\\\\n                      },\\\\n                      \\\\"type\\\\": \\\\"object\\\\",\\\\n                      \\\\"additionalProperties\\\\": false\\\\n                    }\\\\n                  },\\\\n                  \\\\"type\\\\": \\\\"object\\\\",\\\\n                  \\\\"additionalProperties\\\\": false\\\\n                }\\\\n              },\\\\n              \\\\"type\\\\": \\\\"object\\\\",\\\\n              \\\\"additionalProperties\\\\": false\\\\n            }\\\\n          },\\\\n          \\\\"type\\\\": \\\\"object\\\\",\\\\n          \\\\"additionalProperties\\\\": false\\\\n        }\\\\n      },\\\\n      \\\\"type\\\\": \\\\"object\\\\",\\\\n      \\\\"additionalProperties\\\\": false\\\\n    }\\\\n  },\\\\n  \\\\"title\\\\": \\\\"Values\\\\",\\\\n  \\\\"type\\\\": \\\\"object\\\\",\\\\n  \\\\"additionalProperties\\\\": false\\\\n}'),
  name?: string(name='name', description='The component name.', example='coredns'),
  version?: string(name='version', description='The component version.', example='1.8.4.1'),
}

model DescribeClusterAddonMetadataResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeClusterAddonMetadataResponseBody(name='body'),
}

/**
 * @deprecated OpenAPI DescribeClusterAddonMetadata is deprecated
 *
 * @summary You can call the DescribeClusterAddonMetadata operation to query the metadata of a component version. The metadata includes the component version and available parameters.
 *
 * @param request DescribeClusterAddonMetadataRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeClusterAddonMetadataResponse
 */
// Deprecated
async function describeClusterAddonMetadataWithOptions(clusterId: string, componentId: string, request: DescribeClusterAddonMetadataRequest, headers: map[string]string, runtime: Util.RuntimeOptions): DescribeClusterAddonMetadataResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.version)) {
    query['version'] = request.version;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeClusterAddonMetadata',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/clusters/${OpenApiUtil.getEncodeParam(clusterId)}/components/${OpenApiUtil.getEncodeParam(componentId)}/metadata`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @deprecated OpenAPI DescribeClusterAddonMetadata is deprecated
 *
 * @summary You can call the DescribeClusterAddonMetadata operation to query the metadata of a component version. The metadata includes the component version and available parameters.
 *
 * @param request DescribeClusterAddonMetadataRequest
 * @return DescribeClusterAddonMetadataResponse
 */
// Deprecated
async function describeClusterAddonMetadata(clusterId: string, componentId: string, request: DescribeClusterAddonMetadataRequest): DescribeClusterAddonMetadataResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return describeClusterAddonMetadataWithOptions(clusterId, componentId, request, headers, runtime);
}

model DescribeClusterAddonUpgradeStatusResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: object(name='body'),
}

/**
 * @deprecated OpenAPI DescribeClusterAddonUpgradeStatus is deprecated
 *
 * @summary You can call the DescribeClusterAddonUpgradeStatus operation to query the update progress of a cluster component.
 *
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeClusterAddonUpgradeStatusResponse
 */
// Deprecated
async function describeClusterAddonUpgradeStatusWithOptions(ClusterId: string, ComponentId: string, headers: map[string]string, runtime: Util.RuntimeOptions): DescribeClusterAddonUpgradeStatusResponse {
  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
  };
  var params = new OpenApi.Params{
    action = 'DescribeClusterAddonUpgradeStatus',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/clusters/${OpenApiUtil.getEncodeParam(ClusterId)}/components/${OpenApiUtil.getEncodeParam(ComponentId)}/upgradestatus`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @deprecated OpenAPI DescribeClusterAddonUpgradeStatus is deprecated
 *
 * @summary You can call the DescribeClusterAddonUpgradeStatus operation to query the update progress of a cluster component.
 *
 * @return DescribeClusterAddonUpgradeStatusResponse
 */
// Deprecated
async function describeClusterAddonUpgradeStatus(ClusterId: string, ComponentId: string): DescribeClusterAddonUpgradeStatusResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return describeClusterAddonUpgradeStatusWithOptions(ClusterId, ComponentId, headers, runtime);
}

model DescribeClusterAddonsUpgradeStatusRequest {
  componentIds?: [ string ](name='componentIds', description='The list of component names.

This parameter is required.'),
}

model DescribeClusterAddonsUpgradeStatusShrinkRequest {
  componentIdsShrink?: string(name='componentIds', description='The list of component names.

This parameter is required.'),
}

model DescribeClusterAddonsUpgradeStatusResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: object(name='body'),
}

/**
 * @deprecated OpenAPI DescribeClusterAddonsUpgradeStatus is deprecated
 *
 * @summary You can call the DescribeClusterAddonsUpgradeStatus operation to query the update progress of a component by component name.
 *
 * @param tmpReq DescribeClusterAddonsUpgradeStatusRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeClusterAddonsUpgradeStatusResponse
 */
// Deprecated
async function describeClusterAddonsUpgradeStatusWithOptions(ClusterId: string, tmpReq: DescribeClusterAddonsUpgradeStatusRequest, headers: map[string]string, runtime: Util.RuntimeOptions): DescribeClusterAddonsUpgradeStatusResponse {
  Util.validateModel(tmpReq);
  var request = new DescribeClusterAddonsUpgradeStatusShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.componentIds)) {
    request.componentIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.componentIds, 'componentIds', 'json');
  }
  var query : map[string]any = {};
  if (!Util.isUnset(request.componentIdsShrink)) {
    query['componentIds'] = request.componentIdsShrink;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeClusterAddonsUpgradeStatus',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/clusters/${OpenApiUtil.getEncodeParam(ClusterId)}/components/upgradestatus`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @deprecated OpenAPI DescribeClusterAddonsUpgradeStatus is deprecated
 *
 * @summary You can call the DescribeClusterAddonsUpgradeStatus operation to query the update progress of a component by component name.
 *
 * @param request DescribeClusterAddonsUpgradeStatusRequest
 * @return DescribeClusterAddonsUpgradeStatusResponse
 */
// Deprecated
async function describeClusterAddonsUpgradeStatus(ClusterId: string, request: DescribeClusterAddonsUpgradeStatusRequest): DescribeClusterAddonsUpgradeStatusResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return describeClusterAddonsUpgradeStatusWithOptions(ClusterId, request, headers, runtime);
}

model DescribeClusterAddonsVersionResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: object(name='body'),
}

/**
 * @deprecated OpenAPI DescribeClusterAddonsVersion is deprecated
 *
 * @summary You can call the DescribeClusterAddonsVersion operation to query the details about all components in a cluster by cluster ID.
 *
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeClusterAddonsVersionResponse
 */
// Deprecated
async function describeClusterAddonsVersionWithOptions(ClusterId: string, headers: map[string]string, runtime: Util.RuntimeOptions): DescribeClusterAddonsVersionResponse {
  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
  };
  var params = new OpenApi.Params{
    action = 'DescribeClusterAddonsVersion',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/clusters/${OpenApiUtil.getEncodeParam(ClusterId)}/components/version`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @deprecated OpenAPI DescribeClusterAddonsVersion is deprecated
 *
 * @summary You can call the DescribeClusterAddonsVersion operation to query the details about all components in a cluster by cluster ID.
 *
 * @return DescribeClusterAddonsVersionResponse
 */
// Deprecated
async function describeClusterAddonsVersion(ClusterId: string): DescribeClusterAddonsVersionResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return describeClusterAddonsVersionWithOptions(ClusterId, headers, runtime);
}

model DescribeClusterAttachScriptsRequest {
  arch?: string(name='arch', description='The CPU architecture of the node. Valid values: `amd64`, `arm`, and `arm64`.

Default value: `amd64`.

>  This parameter is required if you want to add the existing node to a Container Service for Kubernetes (ACK) Edge cluster.', example='amd64'),
  expired?: long(name='expired', description='Describes the expiration time of the generated token, formatted as a Unix timestamp. For example, 1739980800 represents 2025-02-20 00:00:00.', example='1740037333'),
  formatDisk?: boolean(name='format_disk', description='Specifies whether to mount data disks to an existing instance when you manually add this instance to the cluster. You can add data disks to store container data and images. Valid values:

*   `true`: mounts data disks to the existing instance. Back up the data first to prevent losses.
*   `false`: does not mount data disks to the existing instance.

Default value: `false`.

Mounting rules:

*   If the Elastic Compute Service (ECS) instances are already mounted with data disks and the file system of the last data disk is uninitialized, the system automatically formats this data disk to ext4 and mounts it to /var/lib/docker and /var/lib/kubelet.
*   If no data disk is mounted to the ECS instance, no new disk will be mounted.', example='false'),
  keepInstanceName?: boolean(name='keep_instance_name', description='Specifies whether to retain the name of the existing instance when it is added to the cluster. ``Valid values:

*   `true`: retains the instance name.
*   `false`: renames the instance to worker-k8s-for-cs-\\\\<clusterid>.

Default value: `true`.', example='true'),
  nodepoolId?: string(name='nodepool_id', description='The ID of the node pool to which you want to add an existing node.

>  If not specified, the node is added to the default node pool.', example='np1c9229d9be2d432c93f77a88fca0****'),
  options?: string(name='options', description='The node configurations for the existing instance that you want to add as a node.

>  This parameter is required if you want to add the existing node to an ACK Edge cluster.', example='{\\\\"enableIptables\\\\": true,\\\\"manageRuntime\\\\": true,\\\\"quiet\\\\": true,\\\\"allowedClusterAddons\\\\": [\\\\"kube-proxy\\\\",\\\\"flannel\\\\",\\\\"coredns\\\\"]}'),
  rdsInstances?: [ string ](name='rds_instances', description='If you specify a list of ApsaraDB RDS instances, ECS instances in the cluster will be automatically added to the whitelist of the ApsaraDB RDS instances.'),
}

model DescribeClusterAttachScriptsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: string(name='body'),
}

/**
 * @summary Queries the scripts used to add existing nodes to a Container Service for Kubernetes (ACK) cluster. ACK allows you to manually add existing Elastic Compute Service (ECS) instances to an ACK cluster as worker nodes or re-add worker nodes that you remove from the cluster to a node pool.
 *
 * @param request DescribeClusterAttachScriptsRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeClusterAttachScriptsResponse
 */
async function describeClusterAttachScriptsWithOptions(ClusterId: string, request: DescribeClusterAttachScriptsRequest, headers: map[string]string, runtime: Util.RuntimeOptions): DescribeClusterAttachScriptsResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.arch)) {
    body['arch'] = request.arch;
  }
  if (!Util.isUnset(request.expired)) {
    body['expired'] = request.expired;
  }
  if (!Util.isUnset(request.formatDisk)) {
    body['format_disk'] = request.formatDisk;
  }
  if (!Util.isUnset(request.keepInstanceName)) {
    body['keep_instance_name'] = request.keepInstanceName;
  }
  if (!Util.isUnset(request.nodepoolId)) {
    body['nodepool_id'] = request.nodepoolId;
  }
  if (!Util.isUnset(request.options)) {
    body['options'] = request.options;
  }
  if (!Util.isUnset(request.rdsInstances)) {
    body['rds_instances'] = request.rdsInstances;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeClusterAttachScripts',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/clusters/${OpenApiUtil.getEncodeParam(ClusterId)}/attachscript`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'string',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Queries the scripts used to add existing nodes to a Container Service for Kubernetes (ACK) cluster. ACK allows you to manually add existing Elastic Compute Service (ECS) instances to an ACK cluster as worker nodes or re-add worker nodes that you remove from the cluster to a node pool.
 *
 * @param request DescribeClusterAttachScriptsRequest
 * @return DescribeClusterAttachScriptsResponse
 */
async function describeClusterAttachScripts(ClusterId: string, request: DescribeClusterAttachScriptsRequest): DescribeClusterAttachScriptsResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return describeClusterAttachScriptsWithOptions(ClusterId, request, headers, runtime);
}

model DescribeClusterDetailResponseBody = {
  clusterDomain?: string(name='cluster_domain', description='The domain name of the cluster.', example='cluster.local'),
  clusterId?: string(name='cluster_id', description='The cluster ID.', example='c82e6987e2961451182edacd74faf****'),
  clusterSpec?: string(name='cluster_spec', description='After you set `cluster_type` to `ManagedKubernetes` and configure the `profile` parameter, you can further specify the edition of the cluster.

*   `ack.pro.small`: Pro.
*   `ack.standard`: Basic. If you leave the parameter empty, the Basic edition is selected.', example='ack.pro.small'),
  clusterType?: string(name='cluster_type', description='*   `Kubernetes`: ACK dedicated cluster.
*   `ManagedKubernetes`: ACK managed cluster. ACK managed clusters include ACK Basic clusters, ACK Pro clusters, ACK Serverless clusters (Basic and Pro), ACK Edge clusters (Basic and Pro), and ACK Lingjun clusters (Pro).
*   `ExternalKubernetes`: registered cluster.', example='Kubernetes'),
  containerCidr?: string(name='container_cidr', description='The CIDR block of the pod. The configuration of the Flannel network plug-in.', example='172.20.0.0/16'),
  controlPlaneConfig?: {
    autoRenew?: boolean(name='auto_renew', description='Indicates whether auto-renewal is enabled for the nodes.', example='true'),
    autoRenewPeriod?: long(name='auto_renew_period', description='The auto-renewal duration for the nodes.', example='1'),
    chargeType?: string(name='charge_type', description='The billing method of the control plane node.', example='PrePaid'),
    cloudMonitorFlags?: boolean(name='cloud_monitor_flags', description='Indicates whether to install CloudMonitor for the node.', example='true'),
    cpuPolicy?: string(name='cpu_policy', description='The CPU management policy of nodes.', example='none'),
    deploymentsetId?: string(name='deploymentset_id', description='The ID of the deployment set.', example='ds-bp10b35imuam5amw****'),
    imageId?: string(name='image_id', description='The ID of the image.', example='aliyun_3_x64_20G_alibase_20240819.vhd'),
    imageType?: string(name='image_type', description='The type of the OS image.', example='AliyunLinux3'),
    instanceTypes?: [ string ](name='instance_types', description='The instance types of the nodes.'),
    keyPair?: string(name='key_pair', description='The name of the key pair. You must set key_pair or login_password.', example='ack'),
    nodePortRange?: string(name='node_port_range', description='The node port range.', example='30000-32767'),
    period?: long(name='period', description='The subscription duration.', example='1'),
    periodUnit?: string(name='period_unit', description='The unit of the subscription duration.', example='Month'),
    runtime?: string(name='runtime', description='The runtime.', example='containerd'),
    securityHardeningOs?: boolean(name='security_hardening_os', description='Indicates whether to enable Alibaba Cloud Linux Security Hardening.', example='true'),
    size?: long(name='size', description='The number of control plane nodes.', example='3'),
    socEnabled?: boolean(name='soc_enabled', description='Indicates whether to enable Multi-Level Protection Scheme (MLPS) security hardening.', example='false'),
    systemDiskBurstingEnabled?: boolean(name='system_disk_bursting_enabled', description='Indicates whether to enable the burst feature for the system disk.', example='true'),
    systemDiskCategory?: string(name='system_disk_category', description='The category of the system disk for nodes.', example='cloud_essd'),
    systemDiskPerformanceLevel?: string(name='system_disk_performance_level', description='The performance level (PL) of the system disk that you want to use for the node. This parameter takes effect only for ESSDs.', example='PL1'),
    systemDiskProvisionedIops?: long(name='system_disk_provisioned_iops', description='The preset read/write IOPS of the system disk.', example='1000'),
    systemDiskSize?: long(name='system_disk_size', description='The system disk size of the node. The value must be at least 40 GB.', example='120'),
    systemDiskSnapshotPolicyId?: string(name='system_disk_snapshot_policy_id', description='The automatic snapshot policy of the node.', example='sp-2zej1nogjvovnz4z****'),
  }(name='control_plane_config', description='The control plane configurations in an ACK dedicated cluster.'),
  created?: string(name='created', description='The time when the cluster was created.', example='2019-11-25T15:50:20+08:00'),
  currentVersion?: string(name='current_version', description='The current Kubernetes version of the cluster. For more information about the Kubernetes versions supported by ACK, see [Release notes for Kubernetes versions](https://help.aliyun.com/document_detail/185269.html).', example='1.16.6-aliyun.1'),
  deletionProtection?: boolean(name='deletion_protection', description='Indicates whether deletion protection is enabled for the cluster. If deletion protection is enabled, the cluster cannot be deleted in the Container Service console or by calling API operations. Valid values:

*   `true`: deletion protection is enabled for the cluster. This way, the cluster cannot be deleted in the Container Service console or by calling API operations.
*   `false`: deletion protection is disabled for the cluster. This way, the cluster can be deleted in the Container Service console or by calling API operations.', example='true'),
  dockerVersion?: string(name='docker_version', description='The Docker version that is used by the cluster.', example='19.03.5'),
  externalLoadbalancerId?: string(name='external_loadbalancer_id', description='The ID of the Server Load Balancer (SLB) instance that is created for the Ingress of the cluster.', example='lb-2zehc05z3b8dwiifh****'),
  initVersion?: string(name='init_version', description='The initial Kubernetes version of the cluster.', example='1.16.6-aliyun.1'),
  ipStack?: string(name='ip_stack', description='The IP protocol stack of the cluster. Valid values:

*   ipv4: creates a cluster that supports only the IPv4 protocol stack.
*   dual: creates a cluster that supports IPv4/IPv6 dual-stack.', example='ipv4'),
  maintenanceWindow?: MaintenanceWindow(name='maintenance_window', description='The maintenance window of the cluster. This feature is available only in ACK Pro clusters.'),
  masterUrl?: string(name='master_url', description='The endpoints of the cluster, including an internal endpoint and a public endpoint.', example='{\\\\"intranet_api_server_endpoint\\\\":\\\\"https://192.168.0.251:6443\\\\"***}'),
  metaData?: string(name='meta_data', description='The metadata of the cluster.', example='\\\\"Addons\\\\":***'),
  name?: string(name='name', description='The name of the cluster.

The name must be 1 to 63 characters in length, and can contain digits, letters, and hyphens (-). The name cannot start with a hyphen (-).', example='cluster-demo'),
  networkMode?: string(name='network_mode', description='The network type of the cluster. Example: Virtual Private Cloud (VPC).', example='vpc'),
  nextVersion?: string(name='next_version', description='The Kubernetes version to which the cluster can be updated.', example='1.18.8-aliyun.1'),
  nodeCidrMask?: string(name='node_cidr_mask', description='The maximum number of IP addresses that can be assigned to nodes. This number is determined by the node CIDR block. This parameter takes effect only if the cluster uses Flannel network plug-in.', example='26'),
  operationPolicy?: {
    clusterAutoUpgrade?: {
      channel?: string(name='channel', description='The frequency of auto cluster updates. For more information, see [Update frequency](https://help.aliyun.com/document_detail/2712866.html).

Valid values:

*   patch: specifies the latest patch version.
*   stable: specifies the second-latest minor version.
*   rapid: specifies the latest minor version.', example='patch'),
      enabled?: boolean(name='enabled', description='Specifies whether to enable auto cluster update.', example='true'),
    }(name='cluster_auto_upgrade', description='The configurations of auto cluster update.'),
  }(name='operation_policy', description='The automatic O\\\\&M policy of the cluster.'),
  parameters?: map[string]string(name='parameters', description='The Resource Orchestration Service (ROS) parameters of the cluster.'),
  privateZone?: boolean(name='private_zone', description='Indicates whether Alibaba Cloud DNS PrivateZone (PrivateZone) is enabled for the cluster. Valid values:

*   `true`: PrivateZone is enabled.
*   `false`: PrivateZone is dislabled.

Default value: false', example='false'),
  profile?: string(name='profile', description='If you set `cluster_type` to `ManagedKubernetes`, an ACK managed cluster is created. In this case, you can further specify the cluster edition.

*   `Default`. ACK managed cluster. ACK managed clusters include ACK Basic clusters and ACK Pro clusters.
*   `Edge`: ACK Edge cluster. ACK Edge clusters include ACK Edge Basic clusters and ACK Edge Pro clusters.
*   `Serverless`: ACK Serverless cluster. ACK Serverless clusters include ACK Serverless Basic clusters and ACK Serverless Pro clusters.
*   `Lingjun`: ACK Lingjun Pro cluster.', example='Default'),
  proxyMode?: string(name='proxy_mode', description='The kube-proxy mode. Valid values:

*   `iptables`: a mature and stable kube-proxy mode that uses iptables rules to conduct Service discovery and load balancing. The performance of this mode is limited by the size of the cluster. This mode is suitable for clusters that run a small number of Services.
*   `ipvs`: provides high performance and uses IP Virtual Server (IPVS). This allows you to configure service discovery and load balancing. This mode is suitable for clusters that are required to run a large number of services. We recommend that you use this mode in scenarios that require high load balancing performance.', example='ipvs'),
  regionId?: string(name='region_id', description='The region ID of the cluster.', example='cn-beijing'),
  resourceGroupId?: string(name='resource_group_id', description='The ID of the resource group to which the cluster belongs.', example='rg-acfmyvw3wjm****'),
  securityGroupId?: string(name='security_group_id', description='The ID of the security group to which the cluster belongs.', example='sg-25yq****'),
  serviceCidr?: string(name='service_cidr', description='The CIDR block of the service network.

This parameter is required.', example='172.21.0.0/20'),
  size?: long(name='size', description='The number of nodes in the cluster. Master nodes and worker nodes are included.', example='5'),
  state?: string(name='state', description='The status of the cluster. Valid values:

*   `initial`: The cluster is being created.
*   `failed`: The cluster failed to be created.
*   `running`: The cluster is running.
*   `updating`: The cluster is being updated.
*   `updating_failed`: The cluster failed to be updated.
*   `scaling`: The cluster is being scaled.
*   `waiting`: The cluster is waiting for connection requests.
*   `disconnected`: The cluster is disconnected.
*   `stopped`: The cluster is stopped.
*   `deleting`: The cluster is being deleted.
*   `deleted`: The cluster is deleted.
*   `delete_failed`: The cluster failed to be deleted.', example='running'),
  subnetCidr?: string(name='subnet_cidr', description='The pod CIDR block. It must be a valid and private CIDR block, and must be one of the following CIDR blocks or their subnets:

*   10.0.0.0/8
*   172.16-31.0.0/12-16
*   192.168.0.0/16

The pod CIDR block cannot overlap with the CIDR block of the VPC in which the cluster is deployed and the CIDR blocks of existing clusters in the VPC. You cannot modify the pod CIDR block after you create the cluster.

For more information about the network planning of ACK clusters, see [Plan CIDR blocks for an ACK cluster](https://help.aliyun.com/document_detail/186964.html).', example='172.20.0.0/16', deprecated=true),
  tags?: [
    Tag
  ](name='tags', description='The resource labels of the cluster.'),
  timezone?: string(name='timezone', description='The time zone', example='Asia/Shanghai'),
  updated?: string(name='updated', description='The time when the cluster was updated.', example='2020-01-13T23:01:03+08:00'),
  vpcId?: string(name='vpc_id', description='The ID of the VPC where the cluster is deployed. This parameter is required when you create a cluster.', example='vpc-2zecuu62b9zw7a7qn****'),
  vswitchId?: string(name='vswitch_id', description='The ID of the vSwitche. This field is deprecated. Use vswitch_ids to query the vSwitches on the control plane and vswitch_ids to query the vSwitches on the data plane.', example='vsw-2zete8s4qocqg0mf6****,vsw-2zete8s4qocqg0mf6****', deprecated=true),
  vswitchIds?: [ string ](name='vswitch_ids', description='The vSwitch for the control plane of the cluster.'),
  workerRamRoleName?: string(name='worker_ram_role_name', description='The name of the worker Resource Access Management (RAM) role. The RAM role is assigned to the worker nodes of the cluster to allow the worker nodes to manage Elastic Compute Service (ECS) instances.', example='KubernetesWorkerRole-ec87d15b-edca-4302-933f-c8a16bf0****'),
  zoneId?: string(name='zone_id', description='The ID of the zone within the region where the cluster is located.', example='cn-beijing-a'),
}

model DescribeClusterDetailResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeClusterDetailResponseBody(name='body'),
}

/**
 * @summary You can call the DescribeClusterDetail operation to query the details of a Container Service for Kubernetes (ACK) cluster by cluster ID.
 *
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeClusterDetailResponse
 */
async function describeClusterDetailWithOptions(ClusterId: string, headers: map[string]string, runtime: Util.RuntimeOptions): DescribeClusterDetailResponse {
  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
  };
  var params = new OpenApi.Params{
    action = 'DescribeClusterDetail',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/clusters/${OpenApiUtil.getEncodeParam(ClusterId)}`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary You can call the DescribeClusterDetail operation to query the details of a Container Service for Kubernetes (ACK) cluster by cluster ID.
 *
 * @return DescribeClusterDetailResponse
 */
async function describeClusterDetail(ClusterId: string): DescribeClusterDetailResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return describeClusterDetailWithOptions(ClusterId, headers, runtime);
}

model DescribeClusterEventsRequest {
  pageNumber?: long(name='page_number', description='The number of the page to return.', example='1'),
  pageSize?: long(name='page_size', description='The number of entries per page. Valid values: 1 to 50. Default value: 50.', example='50'),
  taskId?: string(name='task_id', description='The ID of the query task.', example='T-xascadasd*****'),
}

model DescribeClusterEventsResponseBody = {
  events?: [ 
    {
      clusterId?: string(name='cluster_id', description='The ID of the cluster.', example='c82e6987e2961451182edacd74faf****'),
      data?: {
        level?: string(name='level', description='The severity level of the event.

Valid values:

*   warning

    <!-- -->

    <!-- -->

    <!-- -->

*   error

    <!-- -->

    <!-- -->

    <!-- -->

*   info

    <!-- -->

    <!-- -->

    <!-- -->', example='info'),
        message?: string(name='message', description='The details of the event.', example='Start to upgrade NodePool nodePool/npdd89dc2b76c04f14b06774883b******'),
        reason?: string(name='reason', description='The status of the event.', example='Started'),
      }(name='data', description='The description of the event.'),
      eventId?: string(name='event_id', description='The event ID.', example='e-9ad04f72-8ee7-46bf-a02c-e4a06b39****'),
      source?: string(name='source', description='The event source.', example='cluster'),
      subject?: string(name='subject', description='The subject related to the event.', example='npdd89dc2b76c04f14b06774883b******'),
      time?: string(name='time', description='The time when the event started.', example='2020-12-01T17:31:00Z'),
      type?: string(name='type', description='The type of event. Valid values:', example='nodepool_update'),
    }
  ](name='events', description='The list of events.'),
  pageInfo?: {
    pageNumber?: long(name='page_number', description='The number of the page to return.', example='1'),
    pageSize?: long(name='page_size', description='The number of entries per page. Valid values: 1 to 50. Default value: 50.', example='50'),
    totalCount?: long(name='total_count', description='The total number of entries returned.', example='3'),
  }(name='page_info', description='The pagination information.'),
}

model DescribeClusterEventsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeClusterEventsResponseBody(name='body'),
}

/**
 * @summary Queries events and event details in a Container Service for Kubernetes (ACK) cluster, including the severity level, status, and start time of each event. Events are generated when clusters created, modified, and updated, node pools are created and scaled out, and components are installed.
 *
 * @param request DescribeClusterEventsRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeClusterEventsResponse
 */
async function describeClusterEventsWithOptions(ClusterId: string, request: DescribeClusterEventsRequest, headers: map[string]string, runtime: Util.RuntimeOptions): DescribeClusterEventsResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.pageNumber)) {
    query['page_number'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['page_size'] = request.pageSize;
  }
  if (!Util.isUnset(request.taskId)) {
    query['task_id'] = request.taskId;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeClusterEvents',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/clusters/${OpenApiUtil.getEncodeParam(ClusterId)}/events`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Queries events and event details in a Container Service for Kubernetes (ACK) cluster, including the severity level, status, and start time of each event. Events are generated when clusters created, modified, and updated, node pools are created and scaled out, and components are installed.
 *
 * @param request DescribeClusterEventsRequest
 * @return DescribeClusterEventsResponse
 */
async function describeClusterEvents(ClusterId: string, request: DescribeClusterEventsRequest): DescribeClusterEventsResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return describeClusterEventsWithOptions(ClusterId, request, headers, runtime);
}

model DescribeClusterLogsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: [ 
    {
      ID?: long(name='ID', description='The ID of the log entry.', example='590749245'),
      clusterId?: string(name='cluster_id', description='The cluster ID.', example='c23421cfa74454bc8b37163fd19af***'),
      clusterLog?: string(name='cluster_log', description='The log content.', example='start to update cluster status to CREATE_COMPLETE'),
      created?: string(name='created', description='The time when the log entry was generated.', example='2020-09-11T10:11:51+08:00'),
      updated?: string(name='updated', description='The time when the log entry was updated.', example='2020-09-11T10:11:51+08:00'),
    }
  ](name='body'),
}

/**
 * @summary Queries the cluster log to help analyze cluster issues and locate the cause.
 *
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeClusterLogsResponse
 */
async function describeClusterLogsWithOptions(ClusterId: string, headers: map[string]string, runtime: Util.RuntimeOptions): DescribeClusterLogsResponse {
  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
  };
  var params = new OpenApi.Params{
    action = 'DescribeClusterLogs',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/clusters/${OpenApiUtil.getEncodeParam(ClusterId)}/logs`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'array',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Queries the cluster log to help analyze cluster issues and locate the cause.
 *
 * @return DescribeClusterLogsResponse
 */
async function describeClusterLogs(ClusterId: string): DescribeClusterLogsResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return describeClusterLogsWithOptions(ClusterId, headers, runtime);
}

model DescribeClusterNodePoolDetailResponseBody = {
  autoScaling?: {
    eipBandwidth?: long(name='eip_bandwidth', description='The maximum bandwidth of the elastic IP address (EIP).', example='5'),
    eipInternetChargeType?: string(name='eip_internet_charge_type', description='The metering method of the EIP. Valid values:

*   `PayByBandwidth`: pay-by-bandwidth.
*   `PayByTraffic`: pay-by-data-transfer.', example='PayByBandwidth'),
    enable?: boolean(name='enable', description='Indicates whether auto scaling is enabled. Valid values:

*   `true`: auto scaling is enabled.
*   `false`: auto scaling is disabled. If this parameter is set to false, other parameters in the `auto_scaling` section do not take effect.', example='true'),
    isBondEip?: boolean(name='is_bond_eip', description='Indicates whether an EIP is associated with the node pool. Valid values:

*   `true`: An EIP is associated with the node pool.
*   `false`: No EIP is associated with the node pool.', example='true'),
    maxInstances?: long(name='max_instances', description='The maximum number of Elastic Compute Service (ECS) instances that can be created in the node pool.', example='10'),
    minInstances?: long(name='min_instances', description='The minimum number of ECS instances that must be kept in the node pool.', example='1'),
    type?: string(name='type', description='The instance types that can be used for the auto scaling of the node pool. Valid values:

*   `cpu`: regular instance.
*   `gpu`: GPU-accelerated instance.
*   `gpushare`: shared GPU-accelerated instance.
*   `spot`: preemptible instance.', example='cpu'),
  }(name='auto_scaling', description='The auto scaling configuration of the node pool.'),
  hostNetwork?: boolean(name='host_network', description='Indicates whether the pods in the edge node pool can use the host network.

`true`: sets to host network.

`false`: sets to container network.', example='true'),
  interconnectConfig?: {
    bandwidth?: long(name='bandwidth', description='The bandwidth of the enhanced edge node pool. Unit: Mbit/s.', example='10'),
    ccnId?: string(name='ccn_id', description='The ID of the Cloud Connect Network (CCN) instance that is associated with the enhanced edge node pool.', example='ccn-qm5i0i0q9yi*******'),
    ccnRegionId?: string(name='ccn_region_id', description='The region to which the CCN instance that is associated with the enhanced edge node pool belongs.', example='cn-shanghai'),
    cenId?: string(name='cen_id', description='The ID of the Cloud Enterprise Network (CEN) instance that is associated with the enhanced edge node pool.', example='cen-ey9k9nfhz0f*******'),
    improvedPeriod?: string(name='improved_period', description='The subscription duration of the enhanced edge node pool. The duration is measured in months.', example='1'),
  }(name='interconnect_config', description='The network configuration of the edge node pool. This parameter takes effect only for edge node pools.'),
  interconnectMode?: string(name='interconnect_mode', description='The network type of the edge node pool. This parameter takes effect only if you set the type parameter of the node pool to edge. Valid values:

`basic`: Internet.

`private`: private network.', example='improved'),
  intranet?: boolean(name='intranet', description='Specifies whether all nodes in the edge node pool can communicate with each other at Layer 3.

`true`: The nodes in the edge node pool can communicate with each other at Layer 3.

`false`: The nodes in the edge node pool cannot communicate with each other at Layer 3.', example='true'),
  kubernetesConfig?: {
    cmsEnabled?: boolean(name='cms_enabled', description='Indicates whether the CloudMonitor agent is installed on ECS nodes in the cluster. After the CloudMonitor agent is installed, you can view monitoring information about the ECS instances in the CloudMonitor console. Installation is recommended. Valid values:

*   `true`: The CloudMonitor agent is installed on ECS nodes.
*   `false`: The CloudMonitor agent is not installed on ECS nodes.', example='true'),
    cpuPolicy?: string(name='cpu_policy', description='The CPU management policy of the nodes in the node pool. The following policies are supported if the Kubernetes version of the cluster is 1.12.6 or later.

*   `static`: allows pods with specific resource characteristics on the node to be granted enhanced CPU affinity and exclusivity.
*   `none`: indicates that the default CPU affinity is used.', example='none'),
    labels?: [
      Tag
    ](name='labels', description='The labels that you want to add to the nodes in the cluster. You must add labels based on the following rules:

*   A label is a case-sensitive key-value pair. You can add up to 20 labels.
*   The key must be unique and cannot exceed 64 characters in length. The value can be empty and cannot exceed 128 characters in length. Keys and values cannot start with `aliyun`, `acs:`, `https://`, or `http://`. For more information, see [Labels and Selectors](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#syntax-and-character-set).'),
    nodeNameMode?: string(name='node_name_mode', description='A custom node name consists of a prefix, an IP substring, and a suffix.

*   The prefix and suffix can contain multiple parts that are separated by periods (.). Each part can contain lowercase letters, digits, and hyphens (-). A custom node name must start and end with a digit or lowercase letter.
*   The IP substring length specifies the number of digits to be truncated from the end of the node IP address. The IP substring length ranges from 5 to 12.

For example, if the node IP address is 192.168.0.55, the prefix is aliyun.com, the IP substring length is 5, and the suffix is test, the node name will be aliyun.com00055test.', example='customized,test.,5,.com'),
    preUserData?: string(name='pre_user_data', description='The user-defined script that is executed before nodes are initialized. For more information, see [Generate user-defined data](https://help.aliyun.com/document_detail/49121.html).', example='dGhpcyBpcyBhIGV4YW1wbGU'),
    runtime?: string(name='runtime', description='The name of the container runtime.', example='docker'),
    runtimeVersion?: string(name='runtime_version', description='The version of the container runtime.', example='19.03.5'),
    taints?: [
      Taint
    ](name='taints', description='The taints that you want to add to nodes. Taints can be used together with tolerations to prevent pods from being scheduled to specific nodes. For more information, see [taint-and-toleration](https://kubernetes.io/zh/docs/concepts/scheduling-eviction/taint-and-toleration/).'),
    unschedulable?: boolean(name='unschedulable', description='Whether the expanded node is schedulable.', example='true'),
    userData?: string(name='user_data', description='The custom script to be executed after nodes in the node pool are initialized. For more information, see [Generate user-defined data](https://help.aliyun.com/document_detail/49121.html).', example='IyEvYmluL3NoCmVjaG8gIkhlbGxvIEFDSyEi'),
  }(name='kubernetes_config', description='The configurations of the cluster in which the node pool is deployed.'),
  management?: {
    autoRepair?: boolean(name='auto_repair', description='Indicates whether auto repair is enabled. This parameter takes effect only when `enable=true` is specified. Valid values:

*   `true`: Auto repair is enabled.
*   `false`: Auto repair is disabled.', example='true'),
    autoRepairPolicy?: {
      restartNode?: boolean(name='restart_node', description='Whether to allow restarting nodes.', example='true'),
    }(name='auto_repair_policy', description='Automatic repair node policy.'),
    autoUpgrade?: boolean(name='auto_upgrade', description='Whether to automatically upgrade.', example='true'),
    autoUpgradePolicy?: {
      autoUpgradeKubelet?: boolean(name='auto_upgrade_kubelet', description='Whether to allow automatic upgrading of kubelet.', example='true'),
    }(name='auto_upgrade_policy', description='Automatic upgrade policy.'),
    autoVulFix?: boolean(name='auto_vul_fix', description='Whether to automatically fix CVEs.', example='true'),
    autoVulFixPolicy?: {
      restartNode?: boolean(name='restart_node', description='Whether to allow restarting nodes.', example='true'),
      vulLevel?: string(name='vul_level', description='The vulnerability levels allowed for auto-fixing, separated by commas.', example='asap,nntf'),
    }(name='auto_vul_fix_policy', description='Automatically repair CVE policies.'),
    enable?: boolean(name='enable', description='Indicates whether the managed node pool feature is enabled. Valid values:

*   `true`: The managed node pool feature is enabled.
*   `false`: The managed node pool feature is disabled. Other parameters in this section take effect only when `enable=true` is specified.', example='true'),
    upgradeConfig?: {
      autoUpgrade?: boolean(name='auto_upgrade', description='Indicates whether auto update is enabled. Valid values:

*   `true`: Auto update is enabled.
*   `false`: Auto update is disabled.', example='true'),
      maxUnavailable?: long(name='max_unavailable', description='The maximum number of nodes that can be in the Unavailable state. Valid values: 1 to 1000.

Default value: 1.', example='1'),
      surge?: long(name='surge', description='The number of additional nodes.', example='5'),
      surgePercentage?: long(name='surge_percentage', description='The percentage of additional nodes to the nodes in the node pool. You must set this parameter or `surge`.', example='50'),
    }(name='upgrade_config', description='The configuration of auto update. The configuration takes effect only when `enable=true` is specified.'),
  }(name='management', description='The configuration of the managed node pool feature.'),
  maxNodes?: long(name='max_nodes', description='This parameter is deprecated.

The maximum number of nodes allowed in an edge node pool.', example='10'),
  nodeConfig?: {
    kubeletConfiguration?: KubeletConfig(name='kubelet_configuration', description='The configurations of the kubelet.'),
  }(name='node_config', description='The node configurations.'),
  nodepoolInfo?: {
    created?: string(name='created', description='The time when the node pool was created.', example='2020-09-27T19:14:09.156823496+08:00'),
    isDefault?: boolean(name='is_default', description='Indicates whether the node pool is a default node pool. A Container Service for Kubernetes (ACK) cluster usually has only one default node pool. Valid values: `true`: The node pool is a default node pool. `false`: The node pool is not a default node pool.', example='true'),
    name?: string(name='name', description='The name of the node pool.

The name must be 1 to 63 characters in length, and can contain digits, letters, and hyphens (-). It cannot start with a hyphen (-).', example='default-nodepool'),
    nodepoolId?: string(name='nodepool_id', description='The node pool ID.', example='np615c0e0966124216a0412e10afe0****'),
    regionId?: string(name='region_id', description='The region ID.', example='cn-beijing'),
    resourceGroupId?: string(name='resource_group_id', description='The ID of the resource group.', example='rg-acfmyvw3wjmb****'),
    type?: string(name='type', description='The type of node pool.', example='ess'),
    updated?: string(name='updated', description='The time when the node pool was last updated.', example='2020-09-27T20:37:46+08:00'),
  }(name='nodepool_info', description='The configuration of the node pool.'),
  scalingGroup?: {
    autoRenew?: boolean(name='auto_renew', description='Indicates whether auto-renewal is enabled for the nodes in the node pool. This parameter takes effect only when `instance_charge_type` is set to `PrePaid`. Valid values:

*   `true`: Auto-renewal is enabled.
*   `false`: Auto-renewal is disabled.', example='false'),
    autoRenewPeriod?: long(name='auto_renew_period', description='The duration of the auto-renewal. This parameter takes effect and is required only when `instance_charge_type` is set to `PrePaid`.

If you specify `PeriodUnit=Month`, the valid values are 1, 2, 3, 6, and 12.', example='1'),
    cisEnabled?: boolean(name='cis_enabled', description='【The field is deprecated】Please use the parameter security_hardening_os instead.', example='false', deprecated=true),
    compensateWithOnDemand?: boolean(name='compensate_with_on_demand', description='Indicates whether pay-as-you-go instances are automatically created to meet the required number of ECS instances if preemptible instances cannot be created due to reasons such as cost or insufficient inventory. This parameter takes effect when `multi_az_policy` is set to `COST_OPTIMIZED`. Valid values:

*   `true`: Pay-as-you-go instances are automatically created to meet the required number of ECS instances if preemptible instances cannot be created.
*   `false`: Pay-as-you-go instances are not automatically created to meet the required number of ECS instances if preemptible instances cannot be created.', example='true'),
    dataDisks?: [
      DataDisk
    ](name='data_disks', description='The configurations of the data disks that are attached to the nodes in the node pool. The configurations include the disk category and disk size.'),
    deploymentsetId?: string(name='deploymentset_id', description='The ID of the deployment set to which the ECS instances in the node pool belong.', example='ds-bp1d19mmbsv3jf6xxxxx'),
    desiredSize?: long(name='desired_size', description='The expected number of nodes in the node pool.', example='2'),
    imageId?: string(name='image_id', description='The ID of the custom image. You can call the `DescribeKubernetesVersionMetadata` operation to query the images supported by ACK.', example='aliyun_2_1903_x64_20G_alibase_20200529.vhd'),
    imageType?: string(name='image_type', description='Operating system image type.', example='AliyunLinux'),
    instanceChargeType?: string(name='instance_charge_type', description='The billing method of the nodes in the node pool. Valid values:

*   `PrePaid`: the subscription billing method.
*   `PostPaid`: the pay-as-you-go billing method.', example='PostPaid'),
    instancePatterns?: [
      InstancePatterns
    ](name='instance_patterns', description='The instance properties.'),
    instanceTypes?: [ string ](name='instance_types', description='A list of instance types. You can select multiple instance types. When the system needs to create a node, it starts from the first instance type until the node is created. The instance type that is used to create the node varies based on the actual instance stock.'),
    internetChargeType?: string(name='internet_charge_type', description='The billing method of the public IP address of the node.', example='PayByBandwidth'),
    internetMaxBandwidthOut?: long(name='internet_max_bandwidth_out', description='The maximum outbound bandwidth of the public IP address of the node. Unit: Mbit/s. Valid values: 1 to 100.', example='10'),
    keyPair?: string(name='key_pair', description='The name of the key pair. You must set this parameter or the `login_password` parameter. You must set `key_pair` if the node pool is a managed node pool.', example='pro-nodepool'),
    loginAsNonRoot?: boolean(name='login_as_non_root', description='Whether the popped ECS instance uses a non-root user for login.', example='true'),
    loginPassword?: string(name='login_password', description='The password for SSH logon. You must set this parameter or the `key_pair` parameter. The password must be 8 to 30 characters in length, and must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters.

For security purposes, the returned password is encrypted.', example='********'),
    multiAzPolicy?: string(name='multi_az_policy', description='The ECS instance scaling policy for a multi-zone scaling group. Valid values:

*   `PRIORITY`: the scaling group is scaled based on the VSwitchIds.N parameter. If an ECS instance cannot be created in the zone where the vSwitch that has the highest priority resides, Auto Scaling creates the ECS instance in the zone where the vSwitch that has the next highest priority resides.

*   `COST_OPTIMIZED`: ECS instances are created based on the vCPU unit price in ascending order. Preemptible instances are preferably created when preemptible instance types are specified in the scaling configuration. You can set the `CompensateWithOnDemand` parameter to specify whether to automatically create pay-as-you-go instances when preemptible instances cannot be created due to insufficient resources.

    **

    **Note**The `COST_OPTIMIZED` setting takes effect only when multiple instance types are specified or at least one instance type is specified for preemptible instances.

*   `BALANCE`: ECS instances are evenly distributed across multiple zones specified by the scaling group. If ECS instances become imbalanced among multiple zones due to insufficient inventory, you can call the RebalanceInstances operation of Auto Scaling to balance the instance distribution among zones. For more information, see [RebalanceInstances](https://help.aliyun.com/document_detail/71516.html).

Default value: `PRIORITY`.', example='BALANCE'),
    onDemandBaseCapacity?: long(name='on_demand_base_capacity', description='The minimum number of pay-as-you-go instances that must be kept in the scaling group. Valid values: 0 to 1000. If the number of pay-as-you-go instances is less than the value of this parameter, Auto Scaling preferably creates pay-as-you-go instances.', example='0'),
    onDemandPercentageAboveBaseCapacity?: long(name='on_demand_percentage_above_base_capacity', description='The percentage of pay-as-you-go instances among the extra instances that exceed the number specified by `on_demand_base_capacity`. Valid values: 0 to 100.', example='20'),
    period?: long(name='period', description='The subscription duration of worker nodes. This parameter takes effect and is required only when `instance_charge_type` is set to `PrePaid`.

If `PeriodUnit=Month` is specified, the valid values are 1, 2, 3, 6, 12, 24, 36, 48, and 60.', example='0'),
    periodUnit?: string(name='period_unit', description='The billing cycle of the nodes. This parameter is required if `instance_charge_type` is set to `PrePaid`.

Valid value: `Month`.', example='Month'),
    platform?: string(name='platform', description='The release version of the operating system. Valid values:

*   `CentOS`
*   `AliyunLinux`
*   `Windows`
*   `WindowsCore`', example='AliyunLinux'),
    privatePoolOptions?: {
      id?: string(name='id', description='The ID of the private node pool.', example='eap-bp67acfmxazb4****'),
      matchCriteria?: string(name='match_criteria', description='The type of private node pool. This parameter specifies the type of private node pool that you want to use to create instances. A private node pool is generated when an elasticity assurance or a capacity reservation service takes effect. The system selects a private node pool to launch instances. Valid values:

*   `Open`: open private pool. The system selects an open private node pool to launch instances. If no matching open private node pool is available, the resources in the public node pool are used.
*   `Target`: specific private pool. The system uses the resources of the specified private node pool to launch instances. If the specified private node pool is unavailable, instances cannot be launched.
*   `None`: no private node pool is used. The resources of private node pools are not used to launch the instances.', example='Open'),
    }(name='private_pool_options', description='The configuration of the private node pool.'),
    ramPolicy?: string(name='ram_policy', description='The name of the worker Resource Access Management (RAM) role. The RAM role is assigned to the worker nodes of the cluster to allow the worker nodes to manage ECS instances.', example='KubernetesWorkerRole-021dc54f-929b-437a-8ae0-34c24d3e****'),
    ramRoleName?: string(name='ram_role_name', description='Worker RAM role name.', example='KubernetesWorkerRole-4a4fa089-80c1-48a5-b3c6-9349311f****'),
    rdsInstances?: [ string ](name='rds_instances', description='After you specify the list of RDS instances, the ECS instances in the cluster are automatically added to the whitelist of the RDS instances.'),
    scalingGroupId?: string(name='scaling_group_id', description='The ID of the scaling group.', example='asg-2zeieod8giqmov7z****'),
    scalingPolicy?: string(name='scaling_policy', description='The scaling mode of the scaling group. Valid values:

*   `release`: the standard mode. ECS instances are created and released based on resource usage.
*   `recycle`: the swift mode. ECS instances are created, stopped, or started during scaling events. This reduces the time required for the next scale-out event. When the instance is stopped, you are charged only for the storage service. This does not apply to ECS instances that are attached with local disks.', example='release'),
    securityGroupId?: string(name='security_group_id', description='The ID of the security group to which the node pool is added. If the node pool is added to multiple security groups, the first ID in the value of `security_group_ids` is returned.', example='sg-2ze60ockeekspl3d****'),
    securityGroupIds?: [ string ](name='security_group_ids', description='The IDs of the security groups to which the node pool is added.'),
    securityHardeningOs?: boolean(name='security_hardening_os', description='Alibaba Cloud OS security hardening. Values:
- `true`: Enable Alibaba Cloud OS security hardening. 
- `false`: Do not enable Alibaba Cloud OS security hardening.

Default value: `false`.', example='false'),
    socEnabled?: boolean(name='soc_enabled', description='Indicates whether to enable security reinforcement compliant with the hardening standards. This option is available only when the system image is set to Alibaba Cloud Linux 2 or Alibaba Cloud Linux 3. Alibaba Cloud provides baseline check standards and scanning programs compliant with Grade 3, Version 2.0 of the hardening standards for both Alibaba Cloud Linux 2 and Alibaba Cloud Linux 3 images.', example='false'),
    spotInstancePools?: long(name='spot_instance_pools', description='The number of instance types that are available for creating preemptible instances. Auto Scaling creates preemptible instances of multiple instance types that are available at the lowest cost. Valid values: 1 to 10.', example='5'),
    spotInstanceRemedy?: boolean(name='spot_instance_remedy', description='Indicates whether preemptible instances are supplemented when the number of preemptible instances drops below the specified minimum number. If this parameter is set to true, when the scaling group receives a system message that a preemptible instance is to be reclaimed, the scaling group attempts to create a new instance to replace this instance. Valid values: Valid values:

*   `true`: Supplementation of preemptible instances is enabled.
*   `false`: Supplementation of preemptible instances is disabled.', example='false'),
    spotPriceLimit?: [ 
      {
        instanceType?: string(name='instance_type', description='The instance type of the preemptible instances.', example='ecs.c6.large'),
        priceLimit?: string(name='price_limit', description='The price cap of a preemptible instance of the type.

Unit: USD/hour.', example='0.39'),
      }
    ](name='spot_price_limit', description='The bid configurations of preemptible instances.'),
    spotStrategy?: string(name='spot_strategy', description='The type of preemptible instance. Valid values:

*   NoSpot: a non-preemptible instance.
*   SpotWithPriceLimit: a preemptible instance that is configured with the highest bid price.
*   SpotAsPriceGo: a preemptible instance for which the system automatically bids based on the current market price.

For more information, see [Preemptible instances](https://help.aliyun.com/document_detail/157759.html).', example='NoSpot'),
    systemDiskBurstingEnabled?: boolean(name='system_disk_bursting_enabled', description='Whether to enable Burst (performance burst) for the node system disk, configured when the disk type is cloud_auto.', example='true'),
    systemDiskCategories?: [ string ](name='system_disk_categories', description='The categories of the system disk for nodes. The system attempts to create system disks of a disk category with a lower priority if the disk category with a higher priority is unavailable. Valid values: Valid values:

*   `cloud`: basic disk.
*   `cloud_efficiency`: ultra disk.
*   `cloud_ssd`: standard SSD.
*   `cloud_essd`: Enterprise SSD (ESSD).
*   `cloud_auto`: ESSD AutoPL disk.
*   `cloud_essd_entry`: ESSD Entry disk.

Default value: `cloud_efficiency`.'),
    systemDiskCategory?: string(name='system_disk_category', description='The system disk type. Valid values:

*   `cloud`: basic disk
*   `cloud_efficiency`: ultra disk
*   `cloud_ssd`: standard SSD
*   `cloud_essd`: Enterprise SSD (ESSD)
*   `cloud_auto`: ESSD AutoPL disk
*   `cloud_essd_entry`: ESSD Entry disk

Default value: `cloud_efficiency`.', example='cloud_efficiency'),
    systemDiskEncryptAlgorithm?: string(name='system_disk_encrypt_algorithm', description='The encryption algorithm that is used to encrypt the system disk. Set the value to aes-256.', example='aes-256'),
    systemDiskEncrypted?: boolean(name='system_disk_encrypted', description='Specifies whether to encrypt the system disk. Valid values: Valid values:

*   `true`: encrypts the system disk.
*   `false`: does not encrypt the system disk.', example='false'),
    systemDiskKmsKeyId?: string(name='system_disk_kms_key_id', description='System disk\\\\"s KMS key ID.', example='0e478b7a-4262-4802-b8cb-00d3fb40****'),
    systemDiskPerformanceLevel?: string(name='system_disk_performance_level', description='The performance level (PL) of the system disk that you want to use for the node. This parameter takes effect only for enhanced SSDs (ESSDs).', example='PL1'),
    systemDiskProvisionedIops?: long(name='system_disk_provisioned_iops', description='Pre-configured read and write IOPS for the system disk of the node, configured when the disk type is cloud_auto.', example='1000'),
    systemDiskSize?: long(name='system_disk_size', description='The system disk size of a node. Unit: GiB.

Valid values: 20 to 500.', example='120'),
    tags?: [
      Tag
    ](name='tags', description='The labels that you want to add only to ECS instances.

The label key must be unique and cannot exceed 128 characters in length. The label key and value cannot start with aliyun or acs: or contain https:// or http://.'),
    vswitchIds?: [ string ](name='vswitch_ids', description='The IDs of vSwitches. You can specify 1 to 20 vSwitches.

> We recommend that you select vSwitches in different zones to ensure high availability.'),
  }(name='scaling_group', description='The configurations of the scaling group used by the node pool.'),
  status?: {
    failedNodes?: long(name='failed_nodes', description='The number of failed nodes.', example='0'),
    healthyNodes?: long(name='healthy_nodes', description='The number of healthy nodes.', example='3'),
    initialNodes?: long(name='initial_nodes', description='The number of nodes that are being created.', example='0'),
    offlineNodes?: long(name='offline_nodes', description='The number of offline nodes.', example='0'),
    removingNodes?: long(name='removing_nodes', description='The number of nodes that are being removed.', example='0'),
    servingNodes?: long(name='serving_nodes', description='The number of running nodes.', example='3'),
    state?: string(name='state', description='The status of the node pool. Valid values:

*   `active`: The node pool is active.
*   `scaling`: The node pool is being scaled.
*   `removing`: Nodes are being removed from the node pool.
*   `deleting`: The node pool is being deleted.
*   `updating`: The node pool is being updated.', example='active'),
    totalNodes?: long(name='total_nodes', description='The total number of nodes in the node pool.', example='3'),
  }(name='status', description='The status details about the node pool.'),
  teeConfig?: {
    teeEnable?: boolean(name='tee_enable', description='Indicates whether confidential computing is enabled. Valid values:

*   `true`: Confidential computing is enabled.
*   `false`: Confidential computing is disabled.', example='false'),
  }(name='tee_config', description='The configuration of confidential computing.'),
}

model DescribeClusterNodePoolDetailResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeClusterNodePoolDetailResponseBody(name='body'),
}

/**
 * @summary You can call the DescribeClusterNodePoolDetail.html operation to query the details about a node pool in a cluster by node pool ID.
 *
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeClusterNodePoolDetailResponse
 */
async function describeClusterNodePoolDetailWithOptions(ClusterId: string, NodepoolId: string, headers: map[string]string, runtime: Util.RuntimeOptions): DescribeClusterNodePoolDetailResponse {
  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
  };
  var params = new OpenApi.Params{
    action = 'DescribeClusterNodePoolDetail',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/clusters/${OpenApiUtil.getEncodeParam(ClusterId)}/nodepools/${OpenApiUtil.getEncodeParam(NodepoolId)}`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary You can call the DescribeClusterNodePoolDetail.html operation to query the details about a node pool in a cluster by node pool ID.
 *
 * @return DescribeClusterNodePoolDetailResponse
 */
async function describeClusterNodePoolDetail(ClusterId: string, NodepoolId: string): DescribeClusterNodePoolDetailResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return describeClusterNodePoolDetailWithOptions(ClusterId, NodepoolId, headers, runtime);
}

model DescribeClusterNodePoolsRequest {
  nodepoolName?: string(name='NodepoolName', description='Node pool name.', example='nodepool-test'),
}

model DescribeClusterNodePoolsResponseBody = {
  nodepools?: [ 
    {
      autoScaling?: {
        eipBandwidth?: long(name='eip_bandwidth', description='The maximum bandwidth of the elastic IP address (EIP).', example='5'),
        eipInternetChargeType?: string(name='eip_internet_charge_type', description='The billing method of the EIP. Valid values:

*   `PayByBandwidth`: pay-by-bandwidth.
*   `PayByTraffic`: pay-by-data-transfer.', example='PayByBandwidth'),
        enable?: boolean(name='enable', description='Specifies whether to enable auto scaling. Valid values:

*   `true`
*   `false`: If you set this parameter to `false`, other parameters in `auto_scaling` do not take effect.', example='true'),
        isBondEip?: boolean(name='is_bond_eip', description='Specifies whether to associate an EIP with the node pool. Valid values:

*   `true`
*   `false`', example='true'),
        maxInstances?: long(name='max_instances', description='The maximum number of Elastic Compute Service (ECS) instances that can be created in the node pool.', example='10'),
        minInstances?: long(name='min_instances', description='The minimum number of ECS instances that must be retained in the node pool.', example='2'),
        type?: string(name='type', description='The instance types that can be used for the auto scaling of the node pool. Valid values:

*   `cpu`: regular instance.
*   `gpu`: GPU-accelerated instance.
*   `gpushare`: shared GPU-accelerated instance.
*   `spot`: preemptible instance.', example='cpu'),
      }(name='auto_scaling', description='The configurations of auto scaling.'),
      interconnectConfig?: {
        bandwidth?: long(name='bandwidth', description='This parameter is discontinued.

The bandwidth of the enhanced edge node pool. Unit: Mbit/s.', example='10'),
        ccnId?: string(name='ccn_id', description='This parameter is discontinued.

The ID of the Cloud Connect Network (CCN) instance that is associated with the enhanced edge node pool.', example='ccn-qm5i0i0q9yi*******'),
        ccnRegionId?: string(name='ccn_region_id', description='This parameter is discontinued.

The region in which the CCN instance that is with the enhanced edge node pool resides.', example='cn-shanghai'),
        cenId?: string(name='cen_id', description='This parameter is discontinued.

The ID of the Cloud Enterprise Network (CEN) instance that is associated with the enhanced edge node pool.', example='cen-ey9k9nfhz0f*******'),
        improvedPeriod?: string(name='improved_period', description='This parameter is discontinued.

The subscription duration of the enhanced edge node pool. Unit: months.', example='1'),
      }(name='interconnect_config', description='This parameter is discontinued.

The network configurations of the edge node pool. This parameter takes effect only on edge node pools.'),
      interconnectMode?: string(name='interconnect_mode', description='The network type of the edge node pool. Valid values: basic and dedicated. This parameter takes effect only on edge node pools.', example='improved'),
      kubernetesConfig?: {
        cmsEnabled?: boolean(name='cms_enabled', description='Specifies whether to install the CloudMonitor agent on ECS nodes. After the CloudMonitor agent is installed on ECS nodes, you can view the monitoring information about the instances in the CloudMonitor console. We recommend that you install the CloudMonitor agent. Valid values:

*   `true`
*   `false`', example='true'),
        cpuPolicy?: string(name='cpu_policy', description='The CPU management policy of the nodes in the node pool. The following policies are supported if the version of the cluster is Kubernetes 1.12.6 or later:

*   `static`: allows pods with specific resource characteristics on the node to be granted enhanced CPU affinity and exclusivity.
*   `none`: specifies that the default CPU affinity is used.', example='none'),
        labels?: [
          Tag
        ](name='labels', description='The labels that are added to the nodes in the cluster. You must add labels based on the following rules:

*   A label is a case-sensitive key-value pair. You can add up to 20 labels.
*   The key must be unique and can be up to 64 characters in length. The value can be empty and can be up to 128 characters in length. Keys and values cannot start with `aliyun`, `acs:`, `https://`, or `http://`. For more information, see [Labels and Selectors](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#syntax-and-character-set).'),
        nodeNameMode?: string(name='node_name_mode', description='The custom node name. A custom node name consists of a prefix, an IP substring, and a suffix.

*   The prefix and suffix can contain multiple parts that are separated by periods (.). Each part can contain lowercase letters, digits, and hyphens (-). A custom node name must start and end with a digit or lowercase letter.
*   The IP substring length specifies the number of digits to be truncated from the end of the node IP address. The IP substring length ranges from 5 to 12.

For example, if the node IP address is 192.168.0.55, the prefix is aliyun.com, the IP substring length is 5, and the suffix is test, the node name is aliyun.com00055test.', example='customized,test.,5,.com'),
        preUserData?: string(name='pre_user_data', description='The user-defined script that is executed before nodes are initialized. For more information, see [Generate user-defined data](https://help.aliyun.com/document_detail/49121.html).', example='IyEvYmluL3NoCmVjaG8gIkhlbGxvIEFD'),
        runtime?: string(name='runtime', description='The name of the container runtime.', example='docker'),
        runtimeVersion?: string(name='runtime_version', description='The version of the container runtime.', example='19.03.5'),
        taints?: [
          Taint
        ](name='taints', description='The taints of the nodes in the node pool. Taints can be used together with tolerations to avoid scheduling pods to specified nodes. For more information, see [taint-and-toleration](https://kubernetes.io/zh/docs/concepts/scheduling-eviction/taint-and-toleration/).'),
        unschedulable?: boolean(name='unschedulable', description='Specifies whether the nodes are schedulable after a scale-out activity is performed.', example='true'),
        userData?: string(name='user_data', description='The user-defined script that is executed after nodes are initialized. For more information, see [Generate user-defined data](https://help.aliyun.com/document_detail/49121.html).', example='IyEvYmluL3NoCmVjaG8gIkhlbGxvIEFD****'),
      }(name='kubernetes_config', description='The configurations of the cluster in which the node pool is deployed.'),
      management?: {
        autoRepair?: boolean(name='auto_repair', description='Specifies whether to enable auto repair. This parameter takes effect only if `enable` is set to true. Valid values:

*   `true`
*   `false`', example='true'),
        autoRepairPolicy?: {
          restartNode?: boolean(name='restart_node', description='Specifies whether to allow node restart.', example='true'),
        }(name='auto_repair_policy', description='The auto node repair policy.'),
        autoUpgrade?: boolean(name='auto_upgrade', description='Specifies whether to enable auto update.', example='true'),
        autoUpgradePolicy?: {
          autoUpgradeKubelet?: boolean(name='auto_upgrade_kubelet', description='Specifies whether to allow auto update of the kubelet.', example='true'),
        }(name='auto_upgrade_policy', description='The auto update policy.'),
        autoVulFix?: boolean(name='auto_vul_fix', description='Specifies whether to enable auto Common Vulnerabilities and Exposures (CVE) patching.', example='true'),
        autoVulFixPolicy?: {
          restartNode?: boolean(name='restart_node', description='Specifies whether to allow node restart.', example='true'),
          vulLevel?: string(name='vul_level', description='The severity level of CVEs that can be automatically patched. Multiple severity levels are separated by commas (,).', example='asap,nntf'),
        }(name='auto_vul_fix_policy', description='The auto CVE patching policy.'),
        enable?: boolean(name='enable', description='Specifies whether to enable the managed node pool feature. Valid values:

*   `true`
*   `false`: If you set this parameter to false, other parameters of `management` do not take effect.', example='true'),
        upgradeConfig?: {
          autoUpgrade?: boolean(name='auto_upgrade', description='Specifies whether to enable auto update. Valid values:

*   `true`
*   `false`', example='true'),
          maxUnavailable?: long(name='max_unavailable', description='The maximum number of unavailable nodes. Valid values: 1 to 1000.

Default value: 1', example='1'),
          surge?: long(name='surge', description='The number of additional nodes.', example='5'),
          surgePercentage?: long(name='surge_percentage', description='The percentage of additional nodes to the total nodes in the node pool. You must specify this parameter or the `surge` parameter.

The number of additional nodes = The percentage of additional nodes × The number of nodes in the node pool. For example, if the percentage of additional nodes is 50% and the number of nodes in the node pool is 6, the number of additional nodes is 3.', example='50'),
        }(name='upgrade_config', description='The configurations of auto update. The configurations take effect only if `enable` is set to true.'),
      }(name='management', description='The configurations of managed node pools. Managed node pools are available only in professional managed Kubernetes clusters.'),
      maxNodes?: long(name='max_nodes', description='The maximum number of nodes that can be created in the edge node pool. The value of this parameter must be greater than or equal to 0. A value of 0 indicates that the number of nodes in the node pool is limited only by the quota of nodes in the cluster. In most cases, this parameter is set to a value larger than 0 for edge node pools. This parameter is set to 0 for node pools whose types are ess or default edge node pools.', example='10'),
      nodeConfig?: {
        kubeletConfiguration?: KubeletConfig(name='kubelet_configuration', description='The parameter settings of the kubelet.'),
      }(name='node_config', description='The configurations of nodes.'),
      nodepoolInfo?: {
        created?: string(name='created', description='The time when the node pool was created.', example='2020-09-27T19:14:09.156823496+08:00'),
        isDefault?: boolean(name='is_default', description='Specifies whether the node pool is a default node pool. A Container Service for Kubernetes (ACK) cluster generally has only one default node pool. Valid values:

*   `true`
*   `false`:', example='true'),
        name?: string(name='name', description='The name of the node pool.

The name must be 1 to 63 characters in length, and can contain digits, letters, and hyphens (-). It cannot start with a hyphen (-).', example='default-nodepool'),
        nodepoolId?: string(name='nodepool_id', description='The node pool ID.', example='np615c0e0966124216a0412e10afe0****'),
        regionId?: string(name='region_id', description='The region ID.', example='cn-beijing'),
        resourceGroupId?: string(name='resource_group_id', description='The resource group ID.', example='rg-acfmyvw3wjm****'),
        type?: string(name='type', description='The type of node pool. Valid values:

*   `edge`: edge node pool.
*   `ess`: node pool in the cloud.', example='ess'),
        updated?: string(name='updated', description='The time when the node pool was last updated.', example='2020-09-27T20:37:46+08:00'),
      }(name='nodepool_info', description='The information about the node pool.'),
      scalingGroup?: {
        autoRenew?: boolean(name='auto_renew', description='Specifies whether to enable auto-renewal for the nodes in the node pool. This parameter takes effect only if `instance_charge_type` is set to `PrePaid`. Valid values:

*   `true`
*   `false`', example='false'),
        autoRenewPeriod?: long(name='auto_renew_period', description='The auto-renewal period. Valid values:

*   Valid values when PeriodUnit is set to Week: 1, 2, and 3
*   Valid values when PeriodUnit is set to Month: 1, 2, 3, 6, 12, 24, 36, 48, and 60

Default value: 1.', example='0'),
        cisEnabled?: boolean(name='cis_enabled', description='Specifies whether to enable Center for Internet Security (CIS) reinforcement. CIS reinforcement can be enabled only if Alibaba Cloud Linux 2 or Alibaba Cloud Linux 3 is installed on nodes.', example='false', deprecated=true),
        compensateWithOnDemand?: boolean(name='compensate_with_on_demand', description='Specifies whether to automatically create pay-as-you-go instances to meet the required number of ECS instances if preemptible instances cannot be created due to reasons such as the cost or insufficient inventory. This parameter takes effect if you set `multi_az_policy` to `COST_OPTIMIZED` Valid values:

*   `true`
*   `false`', example='true'),
        dataDisks?: [
          DataDisk
        ](name='data_disks', description='The configurations of the data disks that are mounted to the nodes in the node pool. The configurations include the disk category and disk size.'),
        deploymentsetId?: string(name='deploymentset_id', description='The deployment set ID.', example='ds-bp1d19mmbsv3jf6xxxxx'),
        desiredSize?: long(name='desired_size', description='The expected number of nodes in the node pool.', example='2'),
        imageId?: string(name='image_id', description='The custom image ID. You can call the `DescribeKubernetesVersionMetadata` operation to query the images supported by ACK.', example='aliyun_2_1903_x64_20G_alibase_20200529.vhd'),
        imageType?: string(name='image_type', description='The type of the operating system image.', example='AliyunLinux'),
        instanceChargeType?: string(name='instance_charge_type', description='The billing method of the nodes in the node pool. Valid values:

*   `PrePaid`: subscription.
*   `PostPaid`: pay-as-you-go.', example='PostPaid'),
        instancePatterns?: [
          InstancePatterns
        ](name='instance_patterns', description='The attributes of an instance.'),
        instanceTypes?: [ string ](name='instance_types', description='The list of instance types. You can select multiple instance types. When the system needs to create a node, it starts from the first instance type until the node is created. The instance type that is used to create the node varies based on the inventory.', example='ecs.n4.large'),
        internetChargeType?: string(name='internet_charge_type', description='The billing method of the public IP address.', example='PayByBandwidth'),
        internetMaxBandwidthOut?: long(name='internet_max_bandwidth_out', description='The maximum outbound bandwidth of the public IP address. Unit: Mbit/s. Valid values: 1 to 100.', example='10'),
        keyPair?: string(name='key_pair', description='The name of the key pair. You must specify this parameter or the `login_password` parameter.

You must specify the `key_pair` parameter if the node pool is a managed node pool.', example='pro-nodepool'),
        loginAsNonRoot?: boolean(name='login_as_non_root', description='Specifies whether a non-root user can log on to the ECS instance added to the node pool.', example='true'),
        loginPassword?: string(name='login_password', description='The password for SSH logon. You must specify this parameter or the `key_pair` parameter. The password must be 8 to 30 characters in length, and must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters.

The returned password is encrypted to ensure security.', example='******'),
        multiAzPolicy?: string(name='multi_az_policy', description='The ECS instance scaling policy for the multi-zone scaling group. Valid values:

*   `PRIORITY`: ECS instances are created based on the VSwitchIds.N parameter. If Auto Scaling fails to create an ECS instance in the zone of the vSwitch that has the highest priority, Auto Scaling attempts to create the ECS instance in the zone of the vSwitch that has a lower priority.

*   `COST_OPTIMIZED`: ECS instances are created based on the vCPU unit price in ascending order. Preemptible instances are preferably created when preemptible instance types are specified in the scaling configuration. You can specify `CompensateWithOnDemand` to specify whether to automatically create pay-as-you-go instances if preemptible instances cannot be created due to insufficient resources.

    **

    **Note** `COST_OPTIMIZED` takes effect only if multiple instance types are specified or at least one preemptible instance type is specified.

*   `BALANCE`: ECS instances are evenly distributed across multiple zones specified by the scaling group. If the distribution of ECS instances across zones is not balanced due to reasons such as insufficient inventory, you can call the `RebalanceInstances` operation to evenly distribute the ECS instances across zones. For more information, see [RebalanceInstances](https://help.aliyun.com/document_detail/71516.html).', example='COST_OPTIMIZED'),
        onDemandBaseCapacity?: long(name='on_demand_base_capacity', description='The minimum number of pay-as-you-go instances that must be kept in the scaling group. Valid values: 0 to 1000. If the number of pay-as-you-go instances is smaller than the value of this parameter, Auto Scaling preferably creates pay-as-you-go instances', example='0'),
        onDemandPercentageAboveBaseCapacity?: long(name='on_demand_percentage_above_base_capacity', description='The percentage of pay-as-you-go instances among the extra instances that exceed the number specified by `on_demand_base_capacity`. Valid values: 0 to 100.', example='20'),
        period?: long(name='period', description='The subscription duration of the nodes in the node pool. This parameter takes effect and is required if you set `instance_charge_type` to `PrePaid`.

If `period_unit` is set to Month, the valid values of period are 1, 2, 3, 6, 12, 24, 36, 48, and 60.', example='1'),
        periodUnit?: string(name='period_unit', description='The billing cycle of the nodes in the node pool. This parameter takes effect only if`instance_charge_type` is set to `PrePaid`.

Valid value: `Month`, which indicates that the subscription duration is measured in months.', example='Month'),
        platform?: string(name='platform', description='The operating system distribution. Valid values:

*   `CentOS`
*   `AliyunLinux`
*   `Windows`
*   `WindowsCore`', example='AliyunLinux'),
        privatePoolOptions?: {
          id?: string(name='id', description='The private pool ID, which is the same as the ID of the elasticity assurance or capacity reservation for which the private pool is generated.', example='eap-bp67acfmxazb4****'),
          matchCriteria?: string(name='match_criteria', description='The type of the private node pool. This parameter specifies the type of the private node pool that is used to create instances. A private node pool is generated when an elasticity assurance or a capacity reservation service takes effect. The system selects a private node pool to launch instances. Valid values:

*   `Open`: uses open private pool. The system selects an open private node pool to launch instances. If no matching open private node pool is available, the resources in the public node pool are used.
*   `Target`: uses the specified private node pool. The system uses the resources of the specified private node pool to launch instances. If the specified private node pool is unavailable, instances cannot be launched.
*   `None`: No private node pool is used. The resources of private node pools are not used to launch instances.', example='Open'),
        }(name='private_pool_options', description='The configurations of the private node pool.'),
        ramPolicy?: string(name='ram_policy', description='This field is deprecated and replaced by the ram_role_name parameter.', example='KubernetesWorkerRole-021dc54f-929b-437a-8ae0-34c24d3e****'),
        ramRoleName?: string(name='ram_role_name', description='Worker RAM role name.', example='KubernetesWorkerRole-4a4fa089-80c1-48a5-b3c6-9349311f****'),
        rdsInstances?: [ string ](name='rds_instances', description='The ApsaraDB RDS instances. If you specify the list of ApsaraDB RDS instances, ECS instances in the cluster are automatically added to the whitelist of the ApsaraDB RDS instances.'),
        scalingGroupId?: string(name='scaling_group_id', description='The scaling group ID.', example='asg-2ze8n5qw4atggut8****'),
        scalingPolicy?: string(name='scaling_policy', description='The scaling mode of the scaling group. Valid values:

*   `release`: the standard mode. ECS instances are created and released based on the resource usage.
*   `recycle`: the swift mode. ECS instances are created, stopped, or started during scaling events. This reduces the time required for the next scale-out event. When the instance is stopped, you are charged only for the storage service. This does not apply to ECS instances that are attached to local disks.', example='release'),
        securityGroupId?: string(name='security_group_id', description='The ID of the security group to which the node pool is added. If the node pool is added to multiple security groups, the first ID in the value of the `security_group_ids` parameter is returned.', example='sg-2ze1iuk12m2sb4c4****'),
        securityGroupIds?: [ string ](name='security_group_ids', description='The IDs of security groups for the node pool.'),
        securityHardeningOs?: boolean(name='security_hardening_os', description='Alibaba Cloud OS security hardening. Values:
- `true`: Enable Alibaba Cloud OS security hardening. - `false`: Do not enable Alibaba Cloud OS security hardening.
Default value: `false`.', example='false'),
        socEnabled?: boolean(name='soc_enabled', description='Specifies whether to enable reinforcement based on classified protection. You can enable reinforcement based on classified protection only if Alibaba Cloud Linux 2 or Alibaba Cloud Linux 3 is installed on nodes. Alibaba Cloud provides standards for baseline check and a scanner to ensure the compliance of Alibaba Cloud Linux 2 and Alibaba Cloud Linux 3 images with the level 3 standards of classified protection.', example='false'),
        spotInstancePools?: long(name='spot_instance_pools', description='The number of instance types that are available for creating preemptible instances. Auto Scaling creates preemptible instances of multiple instance types that are available at the lowest cost. Valid values: 1 to 10.', example='5'),
        spotInstanceRemedy?: boolean(name='spot_instance_remedy', description='Specifies whether to enable the supplementation of preemptible instances. If the supplementation of preemptible instances is enabled, when the scaling group receives a system message that a preemptible instance is to be reclaimed, the scaling group attempts to create a new instance to replace this instance. Valid values:

*   `true`
*   `false`', example='false'),
        spotPriceLimit?: [ 
          {
            instanceType?: string(name='instance_type', description='The instance type of preemptible instances.', example='ecs.c6.large'),
            priceLimit?: string(name='price_limit', description='The price cap for a single preemptible instance.

Unit: USD/hour.', example='0.39'),
          }
        ](name='spot_price_limit', description='The bid configurations of preemptible instances.'),
        spotStrategy?: string(name='spot_strategy', description='The bidding policy of preemptible instances. Valid values:

*   NoSpot: non-preemptible.
*   SpotWithPriceLimit: specifies the highest bid.
*   SpotAsPriceGo: automatically submits bids based on the up-to-date market price.

For more information, see [Create a preemptible elastic container instance](https://help.aliyun.com/document_detail/157759.html).', example='NoSpot'),
        systemDiskBurstingEnabled?: boolean(name='system_disk_bursting_enabled', description='Specifies whether to enable Burst for the system disk when the disk type is cloud_auto.', example='true'),
        systemDiskCategories?: [ string ](name='system_disk_categories', description='The categories of system disks. The system creates system disks of a disk category with a lower priority if the disk category with a higher priority is unavailable. Valid values: cloud (basic disk), cloud_efficiency (ultra disk). cloud_ssd (standard SSD), cloud_essd (Enterprise SSD).'),
        systemDiskCategory?: string(name='system_disk_category', description='The type of system disk. Valid values:

*   `cloud_efficiency`: ultra disk
*   `cloud_ssd`: SSD', example='cloud_efficiency'),
        systemDiskEncryptAlgorithm?: string(name='system_disk_encrypt_algorithm', description='The encryption algorithm that is used to encrypt the system disk. Set the value to aes-256.', example='aes-256'),
        systemDiskEncrypted?: boolean(name='system_disk_encrypted', description='Specifies whether to encrypt the system disk. Valid values:

*   true
*   false', example='false'),
        systemDiskKmsKeyId?: string(name='system_disk_kms_key_id', description='The ID of the Key Management Service (KMS) key that is used to encrypt the system disk.', example='0e478b7a-4262-4802-b8cb-00d3fb40****'),
        systemDiskPerformanceLevel?: string(name='system_disk_performance_level', description='The performance level (PL) of the system disk. This parameter takes effect only for an ESSD.', example='PL1'),
        systemDiskProvisionedIops?: long(name='system_disk_provisioned_iops', description='The predefined read and write IOPS of the system disk when the disk type is cloud_auto.', example='1000'),
        systemDiskSize?: long(name='system_disk_size', description='The size of the system disk. Unit: GiB.

Valid values: 20 to 500.', example='120'),
        tags?: [
          Tag
        ](name='tags', description='The labels that you want to add only to Elastic Compute Service (ECS) instances.

The key must be unique and cannot exceed 128 characters in length. The key and value must not start with aliyun or acs: or contain https:// or http://.'),
        vswitchIds?: [ string ](name='vswitch_ids', description='The vSwitch IDs. You can specify 1 to 20 vSwitches.

>  To ensure high availability, we recommend that you select vSwitches in different zones.'),
      }(name='scaling_group', description='The configurations of the scaling group.'),
      status?: {
        failedNodes?: long(name='failed_nodes', description='The number of failed nodes.', example='0'),
        healthyNodes?: long(name='healthy_nodes', description='The number of healthy nodes.', example='3'),
        initialNodes?: long(name='initial_nodes', description='The number of nodes that are being created.', example='0'),
        offlineNodes?: long(name='offline_nodes', description='The number of offline nodes.', example='0'),
        removingNodes?: long(name='removing_nodes', description='The number of nodes that are being removed.', example='0'),
        servingNodes?: long(name='serving_nodes', description='The number of running nodes.', example='3'),
        state?: string(name='state', description='The status of the node pool. Valid values:

*   `active`: The node pool is active.
*   `scaling`: The node pool is being scaled.
*   `removing`: The nodes are being removed from the node pool.
*   `deleting`: The node pool is being deleted.
*   `updating`: The node pool is being updated.', example='active'),
        totalNodes?: long(name='total_nodes', description='The total number of nodes in the node pool.', example='3'),
      }(name='status', description='The status details of the node pool.'),
      teeConfig?: {
        teeEnable?: boolean(name='tee_enable', description='Specifies whether to enable confidential computing for the cluster. Valid values:

*   `true`
*   `false`', example='false'),
      }(name='tee_config', description='The configurations of confidential computing.'),
    }
  ](name='nodepools', description='The node pools.'),
}

model DescribeClusterNodePoolsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeClusterNodePoolsResponseBody(name='body'),
}

/**
 * @summary Queries the information about all node pools in a cluster.
 *
 * @param request DescribeClusterNodePoolsRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeClusterNodePoolsResponse
 */
async function describeClusterNodePoolsWithOptions(ClusterId: string, request: DescribeClusterNodePoolsRequest, headers: map[string]string, runtime: Util.RuntimeOptions): DescribeClusterNodePoolsResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.nodepoolName)) {
    query['NodepoolName'] = request.nodepoolName;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeClusterNodePools',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/clusters/${OpenApiUtil.getEncodeParam(ClusterId)}/nodepools`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Queries the information about all node pools in a cluster.
 *
 * @param request DescribeClusterNodePoolsRequest
 * @return DescribeClusterNodePoolsResponse
 */
async function describeClusterNodePools(ClusterId: string, request: DescribeClusterNodePoolsRequest): DescribeClusterNodePoolsResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return describeClusterNodePoolsWithOptions(ClusterId, request, headers, runtime);
}

model DescribeClusterNodesRequest {
  instanceIds?: string(name='instanceIds', description='The IDs of the nodes that you want to query. Separate multiple node IDs with commas (,).', example='"i-bp11xjhwkj8k966u****,i-bp1dmhc2bu5igkyq****"'),
  nodepoolId?: string(name='nodepool_id', description='The node pool ID.', example='np****'),
  pageNumber?: string(name='pageNumber', description='The page number.

Default value: 1.', example='1'),
  pageSize?: string(name='pageSize', description='The number of entries per page. Valid values: 1 to 100.

Default value: 10.', example='10'),
  state?: string(name='state', description='The node state that you want to use to filter nodes. Valid values:

*   `all`: query nodes in the following four states.
*   `running`: query nodes in the running state.
*   `removing`: query nodes that are being removed.
*   `initial`: query nodes that are being initialized.
*   `failed`: query nodes that fail to be created.

Default value: `all`.', example='running'),
}

model DescribeClusterNodesResponseBody = {
  nodes?: [ 
    {
      creationTime?: string(name='creation_time', description='The time when the node was created.', example='2020-08-25T11:25:35+08:00'),
      errorMessage?: string(name='error_message', description='The error message generated when the node was created.', example='error***'),
      expiredTime?: string(name='expired_time', description='The expiration date of the node.', example='2099-12-31T23:59:00+08:00'),
      hostName?: string(name='host_name', description='The name of the host.', example='iZ2vcckdmxp7u0urj2k****'),
      imageId?: string(name='image_id', description='The ID of the system image that is used by the node.', example='aliyun_2_1903_x64_20G_alibase_20200529.vhd'),
      instanceChargeType?: string(name='instance_charge_type', description='The billing method of the node. Valid values:

*   `PrePaid`: the subscription billing method. If the value is PrePaid, make sure that you have a sufficient balance or credit in your account. Otherwise, an `InvalidPayMethod` error is returned.
*   `PostPaid`: the pay-as-you-go billing method.', example='PostPaid'),
      instanceId?: string(name='instance_id', description='The ID of the instance.', example='i-2vcckdmxp7u0urj2****'),
      instanceName?: string(name='instance_name', description='The name of the instance on which the node is deployed.', example='worker-k8s-for-cs-c5cdf7e3938bc4f8eb0e44b21a80f****'),
      instanceRole?: string(name='instance_role', description='The role of the node. Valid values:

*   Master: master node
*   Worker: worker node', example='Worker'),
      instanceStatus?: string(name='instance_status', description='The status of the node.', example='Running'),
      instanceType?: string(name='instance_type', description='The type of the node.', example='ecs.c5.xlarge'),
      instanceTypeFamily?: string(name='instance_type_family', description='The ECS instance family of the node.', example='ecs.c5'),
      ipAddress?: [ string ](name='ip_address', description='The IP address of the node.'),
      isAliyunNode?: boolean(name='is_aliyun_node', description='Indicates whether the instance on which the node is deployed is provided by Alibaba Cloud. Valid values:

*   `true`: The instance is provided by Alibaba Cloud.
*   `false`: The instance is not provided by Alibaba Cloud.', example='true'),
      nodeName?: string(name='node_name', description='The name of the node. This name is the identifier of the node in the cluster.', example='cn-chengdu.192.168.0.36'),
      nodeStatus?: string(name='node_status', description='Indicates whether the node is ready. Valid values:

*   `Ready`: The node is ready.
*   `NotReady`: The node is not ready.
*   `Unknown`: The status of the node is unknown.
*   `Offline`: The node is offline.', example='Ready'),
      nodepoolId?: string(name='nodepool_id', description='The node pool ID.', example='np0794239424a84eb7a95327369d56****'),
      source?: string(name='source', description='Indicates how the node is initialized. A node can be manually created or created by using Resource Orchestration Service (ROS).', example='ess_attach'),
      spotStrategy?: string(name='spot_strategy', description='The type of preemptible instance. Valid values:

*   NoSpot: a non-preemptible instance.
*   SpotWithPriceLimit: a preemptible instance that is configured with the highest bid price.
*   SpotAsPriceGo: a preemptible instance for which the system automatically bids based on the current market price.', example='NoSpot'),
      state?: string(name='state', description='The status of the node. Valid values:

*   `pending`: The node is being created.
*   `running`: The node is running.
*   `starting`: The node is being started.
*   `stopping`: The node is being stopped.
*   `stopped`: The node is stopped.', example='running'),
    }
  ](name='nodes', description='The details of the nodes in the cluster.'),
  page?: {
    pageNumber?: int32(name='page_number', description='The page number.', example='1'),
    pageSize?: int32(name='page_size', description='The number of entries per page.', example='10'),
    totalCount?: int32(name='total_count', description='The total number of entries returned.', example='5'),
  }(name='page', description='The pagination information.'),
}

model DescribeClusterNodesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeClusterNodesResponseBody(name='body'),
}

/**
 * @summary null
 *
 * @param request DescribeClusterNodesRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeClusterNodesResponse
 */
async function describeClusterNodesWithOptions(ClusterId: string, request: DescribeClusterNodesRequest, headers: map[string]string, runtime: Util.RuntimeOptions): DescribeClusterNodesResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.instanceIds)) {
    query['instanceIds'] = request.instanceIds;
  }
  if (!Util.isUnset(request.nodepoolId)) {
    query['nodepool_id'] = request.nodepoolId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['pageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['pageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.state)) {
    query['state'] = request.state;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeClusterNodes',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/clusters/${OpenApiUtil.getEncodeParam(ClusterId)}/nodes`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary null
 *
 * @param request DescribeClusterNodesRequest
 * @return DescribeClusterNodesResponse
 */
async function describeClusterNodes(ClusterId: string, request: DescribeClusterNodesRequest): DescribeClusterNodesResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return describeClusterNodesWithOptions(ClusterId, request, headers, runtime);
}

model DescribeClusterResourcesRequest {
  withAddonResources?: boolean(name='with_addon_resources', description='Specifies whether to query the resources created by cluster components.', example='false'),
}

model DescribeClusterResourcesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: [ 
    {
      clusterId?: string(name='cluster_id', description='The cluster ID.', example='cb95aa626a47740afbf6aa099b65****'),
      created?: string(name='created', description='The time when the resource was created.', example='2020-09-11T10:11:54+08:00'),
      instanceId?: string(name='instance_id', description='The resource ID.', example='lb-wz9poz4r0ymh8u0uf****'),
      resourceInfo?: string(name='resource_info', description='The resource information. For more information about how to query the source information about the resource, see [ListStackResources](https://help.aliyun.com/document_detail/133836.html).', example='{\\\\"Id\\\\":\\\\"k8s_master_slb\\\\",\\\\"Name\\\\":\\\\"k8s_master_slb\\\\",\\\\"Type\\\\":\\\\"ALIYUN::SLB::LoadBalancer\\\\",\\\\"Status\\\\":\\\\"CREATE_COMPLETE\\\\",\\\\"StatusReason\\\\":\\\\"state changed\\\\",\\\\"Updated\\\\":\\\\"2020-05-21T13:25:02\\\\",\\\\"PhysicalId\\\\":\\\\"lb-wz9poz4r0ymh8u0uf****\\\\"}'),
      resourceType?: string(name='resource_type', description='The resource type.', example='ALIYUN::SLB::LoadBalancer'),
      state?: string(name='state', description='The resource status. Valid values:

*   `CREATE_COMPLETE`: the resource is created.
*   `CREATE_FAILED`: the resource failed to be created.
*   `CREATE_IN_PROGRESS`: the resource is being created.
*   `DELETE_FAILED`: the resource failed to be deleted.
*   `DELETE_IN_PROGRESS`: the resource is being deleted.
*   `ROLLBACK_COMPLETE`: the resource is rolled back.
*   `ROLLBACK_FAILED`: the resource failed to be rolled back.
*   `ROLLBACK_IN_PROGRESS`: the resource is being rolled back.', example='CREATE_COMPLETE'),
      autoCreate?: long(name='auto_create', description='Specifies whether the resource is created by Container Service for Kubernetes (ACK). Valid values:

*   1: the resource is created by ACK.
*   0: the resource is an existing resource.', example='1'),
      dependencies?: [ 
        {
          clusterId?: string(name='cluster_id', description='The ID of the cluster to which the dependent resource is related.', example='cc5ee03f63e43425cb6f71f1a1756****'),
          resourceType?: string(name='resource_type', description='The dependent resource type.', example='ALIYUN::VPC::NatGateway'),
          instanceId?: string(name='instance_id', description='The dependent resource ID.', example='ngw-wz9sphwk42sdtjixo****'),
        }
      ](name='dependencies', description='The dependent resources.'),
      associatedObject?: {
        kind?: string(name='kind', description='The Kubernetes object type.', example='Service'),
        namespace?: string(name='namespace', description='The namespace in which the Kubernetes object resides.', example='kube-system'),
        name?: string(name='name', description='The Kubernetes object name.', example='nginx-ingress-lb'),
      }(name='associated_object', description='The Kubernetes object with which the resource is associated.'),
      deleteBehavior?: {
        deleteByDefault?: boolean(name='delete_by_default', description='Specifies whether to delete the resource by default when the cluster is deleted.', example='false'),
        changeable?: boolean(name='changeable', description='Specifies whether the default behavior returned in delete_by_default can be changed.', example='false'),
      }(name='delete_behavior', description='The deletion behavior of the resource when the cluster is deleted.'),
      creatorType?: string(name='creator_type', description='The type of the resource creator. Valid values:

*   user: The resource is created by the user.
*   system: The resource is created by the ACK management system.
*   addon: The resource is created by a cluster component.', example='addon'),
      extraInfo?: map[string]any(name='extra_info', description='The additional information about the resource.', example='{"IP": "xx.xx.xx.xx"}'),
    }
  ](name='body'),
}

/**
 * @summary You can call the DescribeClusterResources operation to query all resources in a cluster by cluster ID.
 *
 * @param request DescribeClusterResourcesRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeClusterResourcesResponse
 */
async function describeClusterResourcesWithOptions(ClusterId: string, request: DescribeClusterResourcesRequest, headers: map[string]string, runtime: Util.RuntimeOptions): DescribeClusterResourcesResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.withAddonResources)) {
    query['with_addon_resources'] = request.withAddonResources;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeClusterResources',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/clusters/${OpenApiUtil.getEncodeParam(ClusterId)}/resources`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'array',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary You can call the DescribeClusterResources operation to query all resources in a cluster by cluster ID.
 *
 * @param request DescribeClusterResourcesRequest
 * @return DescribeClusterResourcesResponse
 */
async function describeClusterResources(ClusterId: string, request: DescribeClusterResourcesRequest): DescribeClusterResourcesResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return describeClusterResourcesWithOptions(ClusterId, request, headers, runtime);
}

model DescribeClusterTasksRequest {
  pageNumber?: int32(name='page_number', description='The page number.', example='1'),
  pageSize?: int32(name='page_size', description='The number of entries per page.', example='20'),
}

model DescribeClusterTasksResponseBody = {
  pageInfo?: {
    pageNumber?: long(name='page_number', description='The number of the page returned.', example='1'),
    pageSize?: long(name='page_size', description='The number of entries per page.', example='10'),
    totalCount?: long(name='total_count', description='The total number of entries returned.', example='10'),
  }(name='page_info', description='The pagination information.'),
  requestId?: string(name='requestId', description='The request ID.', example='0527ac9a-c899-4341-a21a-xxxxxxxxx'),
  tasks?: [ 
    {
      created?: string(name='created', description='The time when the task was created.', example='2022-08-03T10:11:33+08:00'),
      error?: {
        code?: string(name='code', description='The error code returned.', example='BadRequest'),
        message?: string(name='message', description='The error message returned.', example='Addon status not match'),
      }(name='error', description='The error returned for the task.'),
      state?: string(name='state', description='The status of the task.', example='success'),
      taskId?: string(name='task_id', description='The task ID.', example='install-addons-c3xxxxxx'),
      taskType?: string(name='task_type', description='The type of task.', example='cluster_addon_install'),
      updated?: string(name='updated', description='The time when the task was updated.', example='2022-08-03T10:12:03.482+08:00'),
    }
  ](name='tasks', description='The information about the tasks.'),
}

model DescribeClusterTasksResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeClusterTasksResponseBody(name='body'),
}

/**
 * @summary Queries tasks in a Container Service for Kubernetes (ACK) cluster.
 *
 * @param request DescribeClusterTasksRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeClusterTasksResponse
 */
async function describeClusterTasksWithOptions(clusterId: string, request: DescribeClusterTasksRequest, headers: map[string]string, runtime: Util.RuntimeOptions): DescribeClusterTasksResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.pageNumber)) {
    query['page_number'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['page_size'] = request.pageSize;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeClusterTasks',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/clusters/${OpenApiUtil.getEncodeParam(clusterId)}/tasks`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Queries tasks in a Container Service for Kubernetes (ACK) cluster.
 *
 * @param request DescribeClusterTasksRequest
 * @return DescribeClusterTasksResponse
 */
async function describeClusterTasks(clusterId: string, request: DescribeClusterTasksRequest): DescribeClusterTasksResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return describeClusterTasksWithOptions(clusterId, request, headers, runtime);
}

model DescribeClusterUserKubeconfigRequest {
  privateIpAddress?: boolean(name='PrivateIpAddress', description='Specifies whether to obtain the kubeconfig file that is used to connect to the cluster over the internal network. Valid values:

*   `true`: obtains the kubeconfig file that is used to connect to the master instance over the internal network.
*   `false`: obtains the kubeconfig file that is used to connect to the master instance over the Internet.

Default value: `false`.', example='true'),
  temporaryDurationMinutes?: long(name='TemporaryDurationMinutes', description='The validity period of a temporary kubeconfig file. Unit: minutes. Valid values: 15 to 4320 (3 days).

>  If you do not specify this parameter, the system specifies a longer validity period. The validity period is returned in the `expiration` parameter.', example='15'),
}

model DescribeClusterUserKubeconfigResponseBody = {
  config?: string(name='config', description='The kubeconfig file of the cluster. For more information about the content of the kubeconfig file, see [Configure cluster credentials](https://help.aliyun.com/document_detail/86494.html).', example='apiVersion: v1****'),
  expiration?: string(name='expiration', description='The validity period of the kubeconfig file. The value is the UTC time displayed in RFC3339 format.', example='2024-03-10T09:56:17Z'),
}

model DescribeClusterUserKubeconfigResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeClusterUserKubeconfigResponseBody(name='body'),
}

/**
 * @summary Kubeconfig files store identity and authentication information that is used by clients to access Container Service for Kubernetes (ACK) clusters. To use a kubectl client to manage an ACK cluster, you need to use the corresponding kubeconfig file to connect to the ACK cluster. We recommend that you keep kubeconfig files confidential and revoke kubeconfig files that are not in use. This helps prevent data leaks caused by the disclosure of kubeconfig files.
 *
 * @description >  The default validity period of a kubeconfig file is 3 years. 180 days before a kubeconfig file expires, you can renew it in the Container Service for Kubernetes (ACK) console or by calling API operations. After a kubeconfig file is renewed, the kubeconfig file is valid for 3 years. The previous kubeconfig file still remains valid until expiration. We recommend that you renew your kubeconfig file at the earliest opportunity.
 *
 * @param request DescribeClusterUserKubeconfigRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeClusterUserKubeconfigResponse
 */
async function describeClusterUserKubeconfigWithOptions(ClusterId: string, request: DescribeClusterUserKubeconfigRequest, headers: map[string]string, runtime: Util.RuntimeOptions): DescribeClusterUserKubeconfigResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.privateIpAddress)) {
    query['PrivateIpAddress'] = request.privateIpAddress;
  }
  if (!Util.isUnset(request.temporaryDurationMinutes)) {
    query['TemporaryDurationMinutes'] = request.temporaryDurationMinutes;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeClusterUserKubeconfig',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/k8s/${OpenApiUtil.getEncodeParam(ClusterId)}/user_config`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Kubeconfig files store identity and authentication information that is used by clients to access Container Service for Kubernetes (ACK) clusters. To use a kubectl client to manage an ACK cluster, you need to use the corresponding kubeconfig file to connect to the ACK cluster. We recommend that you keep kubeconfig files confidential and revoke kubeconfig files that are not in use. This helps prevent data leaks caused by the disclosure of kubeconfig files.
 *
 * @description >  The default validity period of a kubeconfig file is 3 years. 180 days before a kubeconfig file expires, you can renew it in the Container Service for Kubernetes (ACK) console or by calling API operations. After a kubeconfig file is renewed, the kubeconfig file is valid for 3 years. The previous kubeconfig file still remains valid until expiration. We recommend that you renew your kubeconfig file at the earliest opportunity.
 *
 * @param request DescribeClusterUserKubeconfigRequest
 * @return DescribeClusterUserKubeconfigResponse
 */
async function describeClusterUserKubeconfig(ClusterId: string, request: DescribeClusterUserKubeconfigRequest): DescribeClusterUserKubeconfigResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return describeClusterUserKubeconfigWithOptions(ClusterId, request, headers, runtime);
}

model DescribeClusterV2UserKubeconfigRequest {
  privateIpAddress?: boolean(name='PrivateIpAddress'),
  temporaryDurationMinutes?: long(name='TemporaryDurationMinutes'),
}

model DescribeClusterV2UserKubeconfigResponseBody = {
  config?: string(name='config'),
}

model DescribeClusterV2UserKubeconfigResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeClusterV2UserKubeconfigResponseBody(name='body'),
}

/**
 * @deprecated OpenAPI DescribeClusterV2UserKubeconfig is deprecated
 *
 * @summary 获取集群kubeconfig接口
 *
 * @param request DescribeClusterV2UserKubeconfigRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeClusterV2UserKubeconfigResponse
 */
// Deprecated
async function describeClusterV2UserKubeconfigWithOptions(ClusterId: string, request: DescribeClusterV2UserKubeconfigRequest, headers: map[string]string, runtime: Util.RuntimeOptions): DescribeClusterV2UserKubeconfigResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.privateIpAddress)) {
    query['PrivateIpAddress'] = request.privateIpAddress;
  }
  if (!Util.isUnset(request.temporaryDurationMinutes)) {
    query['TemporaryDurationMinutes'] = request.temporaryDurationMinutes;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeClusterV2UserKubeconfig',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/api/v2/k8s/${OpenApiUtil.getEncodeParam(ClusterId)}/user_config`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @deprecated OpenAPI DescribeClusterV2UserKubeconfig is deprecated
 *
 * @summary 获取集群kubeconfig接口
 *
 * @param request DescribeClusterV2UserKubeconfigRequest
 * @return DescribeClusterV2UserKubeconfigResponse
 */
// Deprecated
async function describeClusterV2UserKubeconfig(ClusterId: string, request: DescribeClusterV2UserKubeconfigRequest): DescribeClusterV2UserKubeconfigResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return describeClusterV2UserKubeconfigWithOptions(ClusterId, request, headers, runtime);
}

model DescribeClusterVulsResponseBody = {
  vulRecords?: [ 
    {
      cveList?: [ string ](name='cve_list', description='The CVE list.'),
      necessity?: string(name='necessity', description='The severity level of the vulnerability.

Valid values:

*   nntf: low
*   later: medium     
*   asap: high', example='asap'),
      nodeCount?: int32(name='node_count', description='The number of nodes that have the vulnerability.', example='1'),
      nodepoolId?: string(name='nodepool_id', description='The node pool ID.', example='np0156da1082b54fa987e32618dd45f5d3'),
      nodepoolName?: string(name='nodepool_name', description='The name of the node pool.', example='test'),
      vulAliasName?: string(name='vul_alias_name', description='The alias of the vulnerability.', example='CVE-2022-xxxx:rsync Security vulnerabilities'),
      vulName?: string(name='vul_name', description='The name of the vulnerability.', example='oval:com.redhat.rhsa:def:xxxxxxx'),
      vulType?: string(name='vul_type', description='The type of vulnerability.

Valid values:

*   app: application vulnerabilities
*   sca: application vulnerabilities (software component analysis)
*   cve: Linux vulnerabilities
*   cms: Web-CMS vulnerabilities
*   sys: Windows vulnerabilities
*   emg:  emergency vulnerabilities', example='cve'),
    }
  ](name='vul_records', description='An array of vulnerabilities.'),
}

model DescribeClusterVulsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeClusterVulsResponseBody(name='body'),
}

/**
 * @summary Queries the security vulnerability details of a cluster by cluster ID. The details include vulnerability name, vulnerability type, and vulnerability severity. We recommend that you scan your cluster on a regular basis to ensure cluster security.
 *
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeClusterVulsResponse
 */
async function describeClusterVulsWithOptions(clusterId: string, headers: map[string]string, runtime: Util.RuntimeOptions): DescribeClusterVulsResponse {
  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
  };
  var params = new OpenApi.Params{
    action = 'DescribeClusterVuls',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/clusters/${OpenApiUtil.getEncodeParam(clusterId)}/vuls`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Queries the security vulnerability details of a cluster by cluster ID. The details include vulnerability name, vulnerability type, and vulnerability severity. We recommend that you scan your cluster on a regular basis to ensure cluster security.
 *
 * @return DescribeClusterVulsResponse
 */
async function describeClusterVuls(clusterId: string): DescribeClusterVulsResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return describeClusterVulsWithOptions(clusterId, headers, runtime);
}

model DescribeClustersRequest {
  clusterType?: string(name='clusterType', description='The cluster type.', example='ManagedKubernetes'),
  name?: string(name='name', description='The cluster name based on which the system performs fuzzy searches among the clusters that belong to the current Alibaba Cloud account.', example='test'),
  resourceGroupId?: string(name='resource_group_id'),
}

model DescribeClustersResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: [ 
    {
      clusterId?: string(name='cluster_id'),
      clusterType?: string(name='cluster_type'),
      created?: string(name='created'),
      currentVersion?: string(name='current_version'),
      dataDiskCategory?: string(name='data_disk_category'),
      dataDiskSize?: long(name='data_disk_size'),
      deletionProtection?: boolean(name='deletion_protection'),
      dockerVersion?: string(name='docker_version'),
      externalLoadbalancerId?: string(name='external_loadbalancer_id'),
      initVersion?: string(name='init_version'),
      masterUrl?: string(name='master_url'),
      metaData?: string(name='meta_data'),
      name?: string(name='name'),
      networkMode?: string(name='network_mode'),
      privateZone?: boolean(name='private_zone'),
      profile?: string(name='profile'),
      regionId?: string(name='region_id'),
      resourceGroupId?: string(name='resource_group_id'),
      securityGroupId?: string(name='security_group_id'),
      size?: long(name='size'),
      state?: string(name='state'),
      subnetCidr?: string(name='subnet_cidr'),
      tags?: [ 
        {
          key?: string(name='key'),
          value?: string(name='value'),
        }
      ](name='tags'),
      updated?: string(name='updated'),
      vpcId?: string(name='vpc_id'),
      vswitchCidr?: string(name='vswitch_cidr'),
      vswitchId?: string(name='vswitch_id'),
      workerRamRoleName?: string(name='worker_ram_role_name'),
      zoneId?: string(name='zone_id'),
    }
  ](name='body'),
}

/**
 * @deprecated OpenAPI DescribeClusters is deprecated
 *
 * @summary Queries all the clusters that belong to the current Alibaba Cloud account, including Kubernetes clusters and Swarm clusters.
 *
 * @param request DescribeClustersRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeClustersResponse
 */
// Deprecated
async function describeClustersWithOptions(request: DescribeClustersRequest, headers: map[string]string, runtime: Util.RuntimeOptions): DescribeClustersResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.clusterType)) {
    query['clusterType'] = request.clusterType;
  }
  if (!Util.isUnset(request.name)) {
    query['name'] = request.name;
  }
  if (!Util.isUnset(request.resourceGroupId)) {
    query['resource_group_id'] = request.resourceGroupId;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeClusters',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/clusters`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'array',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @deprecated OpenAPI DescribeClusters is deprecated
 *
 * @summary Queries all the clusters that belong to the current Alibaba Cloud account, including Kubernetes clusters and Swarm clusters.
 *
 * @param request DescribeClustersRequest
 * @return DescribeClustersResponse
 */
// Deprecated
async function describeClusters(request: DescribeClustersRequest): DescribeClustersResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return describeClustersWithOptions(request, headers, runtime);
}

model DescribeClustersForRegionRequest {
  clusterId?: string(name='cluster_id', description='The cluster ID.', example='c8155823d057948c69a****'),
  clusterSpec?: string(name='cluster_spec', description='The specification of the clusters to query. Valid values:

*   ack.pro.small: ACK Pro clusters.
*   ack.standard: ACK Basic clusters.', example='ack.standard'),
  clusterType?: string(name='cluster_type', description='The type of the clusters to query. Valid values:

*   Kubernetes: ACK dedicated clusters.
*   ManagedKubernetes: ACK managed clusters. ACK managed clusters include ACK Basic clusters, ACK Pro clusters, ACK Serverless Basic clusters, ACK Serverless Pro clusters, ACK Edge Basic clusters, ACK Edge Pro clusters, and ACK Lingjun Pro clusters.
*   ExternalKubernetes: registered clusters.', example='Kubernetes'),
  name?: string(name='name', description='Perform a fuzzy search by using the cluster name.', example='test-cluster'),
  pageNumber?: long(name='page_number', description='The number of pages.', example='10'),
  pageSize?: long(name='page_size', description='The number of records on each page.', example='3'),
  profile?: string(name='profile', description='The subtype of the clusters to query. Valid values:

*   Default: ACK managed clusters. ACK managed clusters include ACK Basic clusters and ACK Pro clusters.
*   Edge: ACK Edge clusters. ACK Edge clusters include ACK Edge Basic clusters and ACK Edge Pro clusters.
*   Serverless: ACK Serverless clusters. ACK Serverless clusters include ACK Serverless Basic clusters and ACK Serverless Pro clusters.
*   Lingjun: ACK Lingjun Pro clusters.', example='Serverless'),
}

model DescribeClustersForRegionResponseBody = {
  clusters?: [ 
    {
      clusterDomain?: string(name='cluster_domain', description='The domain name of the cluster.', example='cluster.local'),
      clusterId?: string(name='cluster_id', description='The cluster ID.', example='c905d1364c2dd4b6284a3f41790c4****'),
      clusterSpec?: string(name='cluster_spec', description='The types of ACK managed clusters:

*   ack.pro.small: ACK Pro cluster
*   ack.standard: ACK Basic cluster', example='ack.standard'),
      clusterType?: string(name='cluster_type', description='The type of the cluster. Valid values:

*   Kubernetes: ACK dedicated cluster
*   ManagedKubernetes: ACK managed clusters. ACK managed clusters include ACK Basic clusters, ACK Pro clusters, ACK Serverless Basic clusters, ACK Serverless Pro clusters, ACK Edge Basic clusters, ACK Edge Pro clusters, and ACK Lingjun Pro clusters.
*   ExternalKubernetes: registered cluster', example='ManagedKubernetes'),
      containerCidr?: string(name='container_cidr', description='The CIDR block of pods in the cluster.', example='172.20.0.0/16'),
      created?: string(name='created', description='The time at which the instance is created.', example='2020-12-01T20:40:40+08:00'),
      currentVersion?: string(name='current_version', description='The current Kubernetes version of the cluster.', example='1.16.6-aliyun.1'),
      deletionProtection?: boolean(name='deletion_protection', description='Specifies whether to enable cluster deletion protection. If you enable this option, the cluster cannot be deleted in the console or by calling API operations. You can obtain the terminal ID by calling one of the following operations:

*   true: enables deletion protection for the cluster. This way, the cluster cannot be deleted in the ACK console or by calling API operations.
*   false: disables deletion protection for the cluster. This way, the cluster can be deleted in the ACK console or by calling API operations.', example='false'),
      initVersion?: string(name='init_version', description='The initial Kubernetes version of the cluster.', example='1.16.6-aliyun.1'),
      ipStack?: string(name='ip_stack', description='The IP protocol stack of the cluster.', example='ipv4'),
      name?: string(name='name', description='The name of the cluster.', example='test-cluster'),
      nextVersion?: string(name='next_version', description='The Kubernetes version to which the cluster can be updated.', example='1.18.8-aliyun.1'),
      profile?: string(name='profile', description='The subtype of the clusters. Valid values:

*   Default: ACK managed clusters. ACK managed clusters include ACK Basic clusters and ACK Pro clusters.
*   Edge: ACK Edge clusters. ACK Edge clusters include ACK Edge Basic clusters and ACK Edge Pro clusters.
*   Serverless: ACK Serverless clusters. ACK Serverless clusters include ACK Serverless Basic clusters and ACK Serverless Pro clusters.
*   Lingjun: ACK Lingjun Pro clusters.', example='Default'),
      proxyMode?: string(name='proxy_mode', description='The kube-proxy mode of the cluster.

Valid value:

*   iptables: iptables.
*   ipvs: ipvs.', example='ipvs'),
      regionId?: string(name='region_id', description='The region ID.', example='cn-beijing-a'),
      resourceGroupId?: string(name='resource_group_id', description='The ID of the cluster resource group.', example='rg-acfmyvw3wjm****'),
      securityGroupId?: string(name='security_group_id', description='The ID of the security group of the cluster.', example='sg-2zeihch86ooz9io4****'),
      serviceCidr?: string(name='service_cidr', description='The CIDR block of the service network.

This parameter is required.', example='172.21.0.0/20'),
      size?: long(name='size', description='The number of nodes in the ACK cluster.', example='2'),
      state?: string(name='state', description='The status of the cluster. Valid values:

*   initial: The cluster is being created.
*   failed: The cluster failed to be created.
*   running: The cluster is running.
*   Upgrading: The cluster is being updated.
*   scaling: The cluster is being scaled.
*   waiting: The cluster is waiting for connection requests.
*   disconnected: The cluster is disconnected.
*   inactive: The cluster is inactive.
*   unavailable: The cluster is unavailable.
*   deleting: The cluster is being deleted.
*   deleted: The ACK cluster is deleted.
*   delete_failed: The cluster failed to be deleted.', example='running'),
      tags?: [
        Tag
      ](name='tags', description='The list of cluster tags.'),
      timezone?: string(name='timezone', description='The time zone.', example='Asia/Shanghai'),
      updated?: string(name='updated', description='The time when the cluster was updated.', example='2020-12-08T15:37:00+08:00'),
      vpcId?: string(name='vpc_id', description='The ID of the virtual private cloud (VPC) to which the cluster belongs.', example='vpc-2zeg8nf1ukc0fcmvq****'),
      vswitchIds?: [ string ](name='vswitch_ids', description='The list of vSwitches on the control plane of the cluster.'),
    }
  ](name='clusters', description='The information about the clusters returned.'),
  pageInfo?: {
    pageNumber?: int32(name='page_number', description='The number of pages.', example='1'),
    pageSize?: int32(name='page_size', description='The number of records on each page.', example='10'),
    totalCount?: int32(name='total_count', description='The total number of entries returned.', example='10'),
  }(name='page_info', description='The pagination details.'),
}

model DescribeClustersForRegionResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeClustersForRegionResponseBody(name='body'),
}

/**
 * @summary Queries all clusters in a specified region.
 *
 * @param request DescribeClustersForRegionRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeClustersForRegionResponse
 */
async function describeClustersForRegionWithOptions(regionId: string, request: DescribeClustersForRegionRequest, headers: map[string]string, runtime: Util.RuntimeOptions): DescribeClustersForRegionResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.clusterId)) {
    query['cluster_id'] = request.clusterId;
  }
  if (!Util.isUnset(request.clusterSpec)) {
    query['cluster_spec'] = request.clusterSpec;
  }
  if (!Util.isUnset(request.clusterType)) {
    query['cluster_type'] = request.clusterType;
  }
  if (!Util.isUnset(request.name)) {
    query['name'] = request.name;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['page_number'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['page_size'] = request.pageSize;
  }
  if (!Util.isUnset(request.profile)) {
    query['profile'] = request.profile;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeClustersForRegion',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/regions/${OpenApiUtil.getEncodeParam(regionId)}/clusters`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Queries all clusters in a specified region.
 *
 * @param request DescribeClustersForRegionRequest
 * @return DescribeClustersForRegionResponse
 */
async function describeClustersForRegion(regionId: string, request: DescribeClustersForRegionRequest): DescribeClustersForRegionResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return describeClustersForRegionWithOptions(regionId, request, headers, runtime);
}

model DescribeClustersV1Request {
  clusterId?: string(name='cluster_id', description='The cluster ID.', example='ca418e5e6fa2849d78301341700axxxxx'),
  clusterSpec?: string(name='cluster_spec', description='After you set `cluster_type` to `ManagedKubernetes` and configure the `profile` parameter, you can further specify the edition of the cluster. Valid values:

*   `ack.pro.small`: ACK Pro cluster.
*   `ack.standard`: ACK Basic cluster. If you leave the parameter empty, ACK Basic cluster is selected.', example='ack.pro.small'),
  clusterType?: string(name='cluster_type', description='*   `Kubernetes`: ACK dedicated cluster.
*   `ManagedKubernetes`: ACK managed cluster. ACK managed clusters include ACK Basic clusters, ACK Pro clusters, ACK Serverless Basic clusters, ACK Serverless Pro clusters, ACK Edge Basic clusters, ACK Edge Pro clusters, and ACK Lingjun Pro clusters.
*   `ExternalKubernetes`: registered cluster.', example='Kubernetes'),
  name?: string(name='name', description='The cluster name.

The name must be 1 to 63 characters in length, and can contain digits, letters, and hyphens (-). The name cannot start with a hyphen (-).', example='cluster-demo'),
  pageNumber?: long(name='page_number', description='The page number.', example='3'),
  pageSize?: long(name='page_size', description='The number of entries per page.', example='10'),
  profile?: string(name='profile', description='If you set `cluster_type` to `ManagedKubernetes`, an ACK managed cluster is created. In this case, you can further specify the cluster edition. Valid values:

*   `Default`: ACK managed cluster. ACK managed clusters include ACK Basic clusters and ACK Pro clusters.
*   `Edge`: ACK Edge cluster. ACK Edge clusters include ACK Edge Basic clusters and ACK Edge Pro clusters.
*   `Serverless`: ACK Serverless cluster. ACK Serverless clusters include ACK Serverless Basic clusters and ACK Serverless Pro clusters.
*   `Lingjun`: ACK Lingjun Pro cluster.', example='Default'),
  regionId?: string(name='region_id', description='The region ID of the clusters. You can use this parameter to query all clusters in the specified region.', example='cn-hangzhou'),
}

model DescribeClustersV1ResponseBody = {
  clusters?: [ 
    {
      clusterDomain?: string(name='cluster_domain', description='The domain name of the cluster.', example='cluster.local'),
      clusterId?: string(name='cluster_id', description='The cluster ID.', example='c3fb96524f9274b4495df0f12a6b5****'),
      clusterSpec?: string(name='cluster_spec', description='After you set `cluster_type` to `ManagedKubernetes` and configure the `profile` parameter, you can further specify the edition of the cluster. Valid values:

*   `ack.pro.small`: ACK Pro cluster.
*   `ack.standard`: ACK Basic cluster. If you leave the parameter empty, ACK Basic cluster is selected.', example='ack.standard'),
      clusterType?: string(name='cluster_type', description='*   `Kubernetes`: ACK dedicated cluster.
*   `ManagedKubernetes`: ACK managed cluster. ACK managed clusters include ACK Basic clusters, ACK Pro clusters, ACK Serverless Basic clusters, ACK Serverless Pro clusters, ACK Edge Basic clusters, ACK Edge Pro clusters, and ACK Lingjun Pro clusters.
*   `ExternalKubernetes`: registered cluster.', example='Kubernetes'),
      containerCidr?: string(name='container_cidr', description='The pod CIDR block and the configuration of the Flannel network plug-in.', example='172.20.0.0/16'),
      created?: string(name='created', description='The time when the cluster was created.', example='2020-08-20T10:51:29+08:00'),
      currentVersion?: string(name='current_version', description='The Kubernetes version of the cluster.', example='1.16.9-aliyun.1'),
      deletionProtection?: boolean(name='deletion_protection', description='Specifies whether to enable cluster deletion protection. If this option is enabled, the cluster cannot be deleted in the ACK console or by calling API operations. Valid values:

*   `true`: enables deletion protection for the cluster. This way, the cluster cannot be deleted in the ACK console or by calling API operations.
*   `false`: disables deletion protection for the cluster. This way, the cluster can be deleted in the ACK console or by calling API operations.', example='true'),
      dockerVersion?: string(name='docker_version', description='The Docker version that is used by the cluster.', example='19.03.5'),
      externalLoadbalancerId?: string(name='external_loadbalancer_id', description='The ID of the Server Load Balancer (SLB) instance that is used by the Ingresses of the cluster.

The default SLB specification is slb.s1.small, which belongs to the high-performance instance type.', example='lb-2vcrbmlevo6kjpgch****'),
      initVersion?: string(name='init_version', description='The Kubernetes version of the cluster. The Kubernetes versions supported by ACK are the same as the Kubernetes versions supported by open source Kubernetes. We recommend that you specify the latest Kubernetes version. If you do not configure this parameter, the latest Kubernetes version is used.

You can create clusters that run the latest two Kubernetes versions in the ACK console. You can call the API operation to create clusters of other Kubernetes versions. For more information about the Kubernetes versions supported by ACK, see [Release notes for Kubernetes versions](https://help.aliyun.com/document_detail/185269.html).', example='1.16.9-aliyun.1'),
      ipStack?: string(name='ip_stack', description='The IP stack of the cluster. Valid values:

*   ipv4: The cluster is an IPv4 cluster.
*   dual: The cluster is a dual-stack cluster.', example='ipv4'),
      maintenanceWindow?: MaintenanceWindow(name='maintenance_window', description='The maintenance window of the cluster. This feature is available only for ACK managed clusters and ACK Serverless clusters.'),
      masterUrl?: string(name='master_url', description='The address of the cluster API server. It includes an internal endpoint and a public endpoint.', example='{\\\\"api_server_endpoint\\\\":\\\\"\\\\",\\\\"intranet_api_server_endpoint\\\\":\\\\"https://192.168.0.251:6443\\\\"}'),
      metaData?: string(name='meta_data', description='The metadata of the cluster.', example='{\\\\"Addons\\\\":[{\\\\"config\\\\":***}'),
      name?: string(name='name', description='The cluster name.

The name must be 1 to 63 characters in length, and can contain digits, letters, and hyphens (-). The name cannot start with a hyphen (-).', example='cluster-demo'),
      networkMode?: string(name='network_mode', description='The network mode of the cluster. Valid values:

*   `classic`: classic network.
*   `vpc`: virtual private cloud (VPC).
*   `overlay`: overlay network.
*   `calico`: network powered by Calico.', example='vpc'),
      nextVersion?: string(name='next_version', description='The Kubernetes version to which the cluster can be updated.', example='1.18.8-aliyun.1'),
      operationPolicy?: {
        clusterAutoUpgrade?: {
          channel?: string(name='channel', description='The frequency of auto cluster updates. For more information, see [Update frequency](https://help.aliyun.com/document_detail/2712866.html).

Valid values:

*   patch: the latest patch version.
*   stables: the second-latest minor version.
*   rapid: the latest minor version.', example='patch'),
          enabled?: boolean(name='enabled', description='Specifies whether to enable auto cluster update.', example='true'),
        }(name='cluster_auto_upgrade', description='The configurations of auto cluster update.'),
      }(name='operation_policy', description='The automatic O\\\\&M policy of the cluster.'),
      privateZone?: boolean(name='private_zone', description='Indicates whether Alibaba Cloud DNS PrivateZone is enabled. Valid values:

*   `true`: Alibaba Cloud DNS PrivateZone is enabled.
*   `false`: Alibaba Cloud DNS PrivateZone is disabled.', example='false'),
      profile?: string(name='profile', description='The cluster identifier. Valid values:

*   `Default`: ACK managed cluster. ACK managed clusters include ACK Basic clusters and ACK Pro clusters.
*   `Edge`: ACK Edge cluster. ACK Edge clusters include ACK Edge Basic clusters and ACK Edge Pro clusters.
*   `Serverless`: ACK Serverless cluster. ACK Serverless clusters include ACK Serverless Basic clusters and ACK Serverless Pro clusters.
*   `Lingjun`: ACK Lingjun Pro cluster.', example='Default'),
      proxyMode?: string(name='proxy_mode', description='The Kube-proxy mode. Valid values:

*   `iptables`: a mature and stable kube-proxy mode that uses iptables rules to conduct Service discovery and load balancing. The performance of this mode is limited by the size of the cluster. This mode is suitable for clusters that run a small number of Services.
*   `ipvs`: provides high performance and uses IP Virtual Server (IPVS). This allows you to configure service discovery and load balancing. This mode is suitable for clusters that are required to run a large number of services. We recommend that you use this mode in scenarios that require high load balancing performance.', example='ipvs'),
      regionId?: string(name='region_id', description='The region ID of the cluster.', example='cn-beijing'),
      resourceGroupId?: string(name='resource_group_id', description='The ID of the resource group to which the cluster belongs.', example='rg-acfmyvw3wjm****'),
      securityGroupId?: string(name='security_group_id', description='The ID of the security group of the cluster.', example='sg-2vcgwsrwgt5mp0yi****'),
      serviceCidr?: string(name='service_cidr', description='The Service CIDR block.

This parameter is required.', example='172.21.0.0/20'),
      size?: long(name='size', description='The number of nodes in the cluster, including control planes and worker nodes.', example='5'),
      state?: string(name='state', description='The status of the cluster. Valid values:

*   `initial`: The cluster is being created.
*   `failed`: The cluster failed to be created.
*   `running`: The cluster is running.
*   `upgrading`: The cluster is undergoing an upgrade.
*   `updating`: Cluster specification changes are being applied.
*   `removing`: Nodes are being removed from the node pool.
*   `draining`: Node draining is in progress.
*   `scaling`: Auto-scaling operation is in progress for the cluster.
*   `stopped`: The cluster has stopped running.
*   `deleting`: The cluster is being deleted.
*   `deleted`: The cluster has been deleted.
*   `delete_failed`: The cluster failed to be deleted.', example='running'),
      subnetCidr?: string(name='subnet_cidr', description='Tis parameter is deprecated. Use the container_cidr parameter to obtain the pod CIDR block. The pod CIDR block. It must be a valid and private CIDR block, and must be one of the following CIDR blocks or their subnets:

*   10.0.0.0/8
*   172.16-31.0.0/12-16
*   192.168.0.0/16

The pod CIDR block cannot overlap with the CIDR block of the VPC in which the cluster is deployed and the CIDR blocks of existing clusters in the VPC. You cannot modify the pod CIDR block after you create the cluster.

For more information about the network planning of Container Service for Kubernetes (ACK) clusters, see [Plan CIDR blocks for an ACK cluster](https://help.aliyun.com/document_detail/86500.html).', example='172.21.0.0/16', deprecated=true),
      tags?: [
        Tag
      ](name='tags', description='The resource labels of the cluster.'),
      timezone?: string(name='timezone', description='The time zone', example='Asia/Shanghai'),
      updated?: string(name='updated', description='The time when the cluster was updated.', example='2020-09-16T11:09:55+08:00'),
      vpcId?: string(name='vpc_id', description='The ID of the VPC where the cluster is deployed. This parameter is required when you create a cluster.', example='vpc-2vcg932hsxsxuqbgl****'),
      vswitchId?: string(name='vswitch_id', description='The IDs of the vSwitches. You can select one to three vSwitches when you create a cluster. To ensure the high availability of the cluster, we recommend that you select vSwitches in different zones.', example='vsw-2vc41xuumx5z2rdma****,vsw-2vc41xuumx5z2rdma****', deprecated=true),
      vswitchIds?: [ string ](name='vswitch_ids', description='The vSwitches of the control planes.'),
      workerRamRoleName?: string(name='worker_ram_role_name', description='The name of the worker Resource Access Management (RAM) role. The RAM role is assigned to the worker nodes of the cluster to allow the worker nodes to manage ECS instances.', example='KubernetesWorkerRole-ec87d15b-edca-4302-933f-c8a16bf0****'),
      zoneId?: string(name='zone_id', description='The ID of the zone where the cluster is deployed.', example='cn-beijing-b'),
    }
  ](name='clusters', description='The queried cluster(s) details.'),
  pageInfo?: {
    pageNumber?: int32(name='page_number', description='The page number.', example='3'),
    pageSize?: int32(name='page_size', description='The number of entries per page.', example='20'),
    totalCount?: int32(name='total_count', description='The total number of entries returned.', example='50'),
  }(name='page_info', description='The pagination information.'),
}

model DescribeClustersV1Response = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeClustersV1ResponseBody(name='body'),
}

/**
 * @summary Queries the details about Container Service for Kubernetes (ACK) clusters of specified types or specifications within an account.
 *
 * @param request DescribeClustersV1Request
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeClustersV1Response
 */
async function describeClustersV1WithOptions(request: DescribeClustersV1Request, headers: map[string]string, runtime: Util.RuntimeOptions): DescribeClustersV1Response {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.clusterId)) {
    query['cluster_id'] = request.clusterId;
  }
  if (!Util.isUnset(request.clusterSpec)) {
    query['cluster_spec'] = request.clusterSpec;
  }
  if (!Util.isUnset(request.clusterType)) {
    query['cluster_type'] = request.clusterType;
  }
  if (!Util.isUnset(request.name)) {
    query['name'] = request.name;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['page_number'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['page_size'] = request.pageSize;
  }
  if (!Util.isUnset(request.profile)) {
    query['profile'] = request.profile;
  }
  if (!Util.isUnset(request.regionId)) {
    query['region_id'] = request.regionId;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeClustersV1',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/api/v1/clusters`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Queries the details about Container Service for Kubernetes (ACK) clusters of specified types or specifications within an account.
 *
 * @param request DescribeClustersV1Request
 * @return DescribeClustersV1Response
 */
async function describeClustersV1(request: DescribeClustersV1Request): DescribeClustersV1Response {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return describeClustersV1WithOptions(request, headers, runtime);
}

model DescribeEdgeMachineActiveProcessResponseBody = {
  logs?: string(name='logs', description='The activation progress list.', example='[{\\"content\\":\\"步骤 \\"颁发激活凭证\\" 执行开始\\",\\"id\\":0,\\"level\\":3,\\"timestamp\\":1625994913000},{\\"content\\":\\"步骤 \\"颁发激活凭证\\" 执行成功\\",\\"id\\":1,\\"level\\":3,\\"timestamp\\":1625994914000},{\\"content\\":\\"步骤 \\"初始化主机配置\\" 执行开始\\",\\"id\\":2,\\"level\\":3,\\"timestamp\\":1625994975000},{\\"content\\":\\"步骤 \\"初始化主机配置\\" 执行成功\\",\\"id\\":3,\\"level\\":3,\\"timestamp\\":1625994975000}]'),
  progress?: long(name='progress', description='The activation progress.', example='100'),
  requestId?: string(name='request_id', description='The request ID.', example='b62796a8-c5a6-4d3f-beb2-7650e4309cb1'),
  state?: string(name='state', description='The activation status.', example='ACTIVATED'),
  step?: string(name='step', description='The activation step.', example='步骤 \\"初始化主机配置\\" 执行成功'),
}

model DescribeEdgeMachineActiveProcessResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeEdgeMachineActiveProcessResponseBody(name='body'),
}

/**
 * @deprecated OpenAPI DescribeEdgeMachineActiveProcess is deprecated
 *
 * @summary You can call the DescribeEdgeMachineActiveProcess operation to query the activation progress of a cloud-native box.
 *
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeEdgeMachineActiveProcessResponse
 */
// Deprecated
async function describeEdgeMachineActiveProcessWithOptions(edgeMachineid: string, headers: map[string]string, runtime: Util.RuntimeOptions): DescribeEdgeMachineActiveProcessResponse {
  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
  };
  var params = new OpenApi.Params{
    action = 'DescribeEdgeMachineActiveProcess',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/edge_machines/%5Bedge_machineid%5D/activeprocess`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @deprecated OpenAPI DescribeEdgeMachineActiveProcess is deprecated
 *
 * @summary You can call the DescribeEdgeMachineActiveProcess operation to query the activation progress of a cloud-native box.
 *
 * @return DescribeEdgeMachineActiveProcessResponse
 */
// Deprecated
async function describeEdgeMachineActiveProcess(edgeMachineid: string): DescribeEdgeMachineActiveProcessResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return describeEdgeMachineActiveProcessWithOptions(edgeMachineid, headers, runtime);
}

model DescribeEdgeMachineModelsResponseBody = {
  models?: [ 
    {
      cpu?: int32(name='cpu', description='The number of vCores.', example='6'),
      cpuArch?: string(name='cpu_arch', description='The CPU architecture.', example='x86_64/arm64'),
      created?: string(name='created', description='The time when the cloud-native box was created.', example='2021-07-07T20:44:00+08:00'),
      description?: string(name='description', description='The description of the cloud-native box.', example='B010'),
      manageRuntime?: int32(name='manage_runtime', description='Indicates whether the cloud-native box model manages the Docker runtime.', example='0/1'),
      memory?: int32(name='memory', description='The memory. Unit: GB.', example='8'),
      model?: string(name='model', description='The model of the cloud-native box.', example='ACK-V-B010'),
      modelId?: string(name='model_id', description='The ID of the cloud-native box.', example='c34cc753-8908-4739-bd10-ebd922a4****'),
    }
  ](name='models', description='The cloud-native box models.'),
}

model DescribeEdgeMachineModelsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeEdgeMachineModelsResponseBody(name='body'),
}

/**
 * @summary You can call the DescribeEdgeMachineModels operation to query the cloud-native box models.
 *
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeEdgeMachineModelsResponse
 */
async function describeEdgeMachineModelsWithOptions(headers: map[string]string, runtime: Util.RuntimeOptions): DescribeEdgeMachineModelsResponse {
  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
  };
  var params = new OpenApi.Params{
    action = 'DescribeEdgeMachineModels',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/edge_machines/models`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary You can call the DescribeEdgeMachineModels operation to query the cloud-native box models.
 *
 * @return DescribeEdgeMachineModelsResponse
 */
async function describeEdgeMachineModels(): DescribeEdgeMachineModelsResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return describeEdgeMachineModelsWithOptions(headers, runtime);
}

model DescribeEdgeMachineTunnelConfigDetailResponseBody = {
  deviceName?: string(name='device_name', description='The device name.', example='TEST0621N0FF****'),
  model?: string(name='model', description='The model of the cloud-native box.', example='ACK-A-S001'),
  productKey?: string(name='product_key', description='Product Key', example='a11rXul****'),
  requestId?: string(name='request_id', description='Request ID', example='bfd12953-31cb-42f1-8a36-7b80ec345094'),
  sn?: string(name='sn', description='The serial number of the cloud-native box.', example='Q2CB5XZAFBFG****'),
  token?: string(name='token', description='Token', example='abcd****'),
  tunnelEndpoint?: string(name='tunnel_endpoint', description='The tunnel endpoint.', example='wss://frontend-iotx-r-debug.aliyun-inc.test'),
}

model DescribeEdgeMachineTunnelConfigDetailResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeEdgeMachineTunnelConfigDetailResponseBody(name='body'),
}

/**
 * @summary You can call the DescribeEdgeMachineTunnelConfigDetail operation to obtain the SSH token of a cloud-native box.
 *
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeEdgeMachineTunnelConfigDetailResponse
 */
async function describeEdgeMachineTunnelConfigDetailWithOptions(edgeMachineid: string, headers: map[string]string, runtime: Util.RuntimeOptions): DescribeEdgeMachineTunnelConfigDetailResponse {
  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
  };
  var params = new OpenApi.Params{
    action = 'DescribeEdgeMachineTunnelConfigDetail',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/edge_machines/%5Bedge_machineid%5D/tunnelconfig`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary You can call the DescribeEdgeMachineTunnelConfigDetail operation to obtain the SSH token of a cloud-native box.
 *
 * @return DescribeEdgeMachineTunnelConfigDetailResponse
 */
async function describeEdgeMachineTunnelConfigDetail(edgeMachineid: string): DescribeEdgeMachineTunnelConfigDetailResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return describeEdgeMachineTunnelConfigDetailWithOptions(edgeMachineid, headers, runtime);
}

model DescribeEdgeMachinesRequest {
  hostname?: string(name='hostname', description='The `hostname` of the cloud-native box.', example='ack-v-b010-ssdfw****'),
  lifeState?: string(name='life_state', description='The lifecycle status.', example='activated/waitOnline/deleting'),
  model?: string(name='model', description='The type of cloud-native box.', example='ACK-V-B010'),
  onlineState?: string(name='online_state', description='The status of the cloud-native box. Valid values:

*   `offline`
*   `online`', example='offline/online'),
  pageNumber?: long(name='page_number', description='The page number.', example='1'),
  pageSize?: long(name='page_size', description='The number of entries per page.', example='10'),
}

model DescribeEdgeMachinesResponseBody = {
  edgeMachines?: [ 
    {
      activeTime?: string(name='active_time', description='The time when the cloud-native box was activated.', example='2021-07-19T16:07:48+08:00'),
      created?: string(name='created', description='The time when the cloud-native box was created.', example='2021-07-07T20:44:00+08:00'),
      edgeMachineId?: string(name='edge_machine_id', description='The device ID.', example='c61083909b13f4a95b8554bda9577****'),
      hostname?: string(name='hostname', description='The `hostname` of the cloud-native box.', example='ack-v-b010-ssdfw****'),
      lifeState?: string(name='life_state', description='The lifecycle of the cloud-native box.', example='activated'),
      model?: string(name='model', description='The model of the cloud-native box.', example='ACK-V-B010'),
      name?: string(name='name', description='The machine name.', example='ack-v-b010-ssdfw****'),
      onlineState?: string(name='online_state', description='The status of the cloud-native box.', example='online'),
      sn?: string(name='sn', description='The serial number.', example='ACK9GBL31SXX****'),
      updated?: string(name='updated', description='The time when the cloud-native box was last updated.', example='2021-07-07T20:44:00+08:00'),
    }
  ](name='edge_machines', description='The list of cloud-native boxes.'),
  pageInfo?: {
    pageNumber?: int32(name='page_number', description='The page number.

Default value: 1.', example='1'),
    pageSize?: int32(name='page_size', description='The number of entries per page.

Default value: 10.', example='10'),
    totalCount?: int32(name='total_count', description='The total number of pages returned.', example='1'),
  }(name='page_info', description='The paging information.'),
}

model DescribeEdgeMachinesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeEdgeMachinesResponseBody(name='body'),
}

/**
 * @summary You can call the DescribeEdgeMachines operation to query a list of cloud-native boxes.
 *
 * @param request DescribeEdgeMachinesRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeEdgeMachinesResponse
 */
async function describeEdgeMachinesWithOptions(request: DescribeEdgeMachinesRequest, headers: map[string]string, runtime: Util.RuntimeOptions): DescribeEdgeMachinesResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.hostname)) {
    query['hostname'] = request.hostname;
  }
  if (!Util.isUnset(request.lifeState)) {
    query['life_state'] = request.lifeState;
  }
  if (!Util.isUnset(request.model)) {
    query['model'] = request.model;
  }
  if (!Util.isUnset(request.onlineState)) {
    query['online_state'] = request.onlineState;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['page_number'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['page_size'] = request.pageSize;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeEdgeMachines',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/edge_machines`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary You can call the DescribeEdgeMachines operation to query a list of cloud-native boxes.
 *
 * @param request DescribeEdgeMachinesRequest
 * @return DescribeEdgeMachinesResponse
 */
async function describeEdgeMachines(request: DescribeEdgeMachinesRequest): DescribeEdgeMachinesResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return describeEdgeMachinesWithOptions(request, headers, runtime);
}

model DescribeEventsRequest {
  clusterId?: string(name='cluster_id', description='The cluster ID.', example='cf62854ac2130470897be7a27ed1f****'),
  pageNumber?: long(name='page_number', description='The page number.', example='1'),
  pageSize?: long(name='page_size', description='The number of entries per page.', example='50'),
  type?: string(name='type', description='The event type. Valid values:

*   `cluster_create`: cluster creation.
*   `cluster_scaleout`: cluster scale-out.
*   `cluster_attach`: node addition.
*   `cluster_delete`: cluster deletion.
*   `cluster_upgrade`: cluster upgrades.
*   `cluster_migrate`: cluster migration.
*   `cluster_node_delete`: node removal.
*   `cluster_node_drain`: node draining.
*   `cluster_modify`: cluster modifications.
*   `cluster_configuration_modify`: modifications of control plane configurations.
*   `cluster_addon_install`: component installation.
*   `cluster_addon_upgrade`: component updates.
*   `cluster_addon_uninstall`: component uninstallation.
*   `runtime_upgrade`: runtime updates.
*   `nodepool_upgrade`: node pool upgrades.
*   `nodepool_update`: node pool updates.', example='nodepool_upgrade'),
}

model DescribeEventsResponseBody = {
  events?: [ 
    {
      clusterId?: string(name='cluster_id', description='The ID of the cluster.', example='cluster-id'),
      data?: {
        level?: string(name='level', description='The severity level of the event. Valid values:

*   info
*   warning
*   error', example='info'),
        message?: string(name='message', description='The details of the event.', example='Start to upgrade NodePool nodePool/nodePool-A'),
        reason?: string(name='reason', description='The status of the event.', example='Started'),
      }(name='data', description='The description of the event.'),
      eventId?: string(name='event_id', description='The event ID.', example='A234-1234-1234'),
      source?: string(name='source', description='The source of the event.'),
      subject?: string(name='subject', description='The subject of the event.', example='nodePool-id'),
      time?: string(name='time', description='The time when the event started.', example='2022-11-23T20:48:01+08:00'),
      type?: string(name='type', description='The event type. Valid values:

*   `cluster_create`: cluster creation.
*   `cluster_scaleout`: cluster scale-out.
*   `cluster_attach`: node addition.
*   `cluster_delete`: cluster deletion.
*   `cluster_upgrade`: cluster upgrades.
*   `cluster_migrate`: cluster migration.
*   `cluster_node_delete`: node removal.
*   `cluster_node_drain`: node draining.
*   `cluster_modify`: cluster modifications.
*   `cluster_configuration_modify`: modifications of control plane configurations.
*   `cluster_addon_install`: component installation.
*   `cluster_addon_upgrade`: component updates.
*   `cluster_addon_uninstall`: component uninstallation.
*   `runtime_upgrade`: runtime updates.
*   `nodepool_upgrade`: node pool upgrades.
*   `nodepool_update`: node pool updates.', example='nodepool_upgrade'),
    }
  ](name='events', description='The details of the events.'),
  pageInfo?: {
    pageNumber?: long(name='page_number', description='The page number.', example='1'),
    pageSize?: long(name='page_size', description='The number of entries per page.', example='50'),
    totalCount?: long(name='total_count', description='The total number of entries returned.', example='3'),
  }(name='page_info', description='The pagination information.'),
}

model DescribeEventsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeEventsResponseBody(name='body'),
}

/**
 * @summary Queries the detailed information about a type of events, including the severity level, status, and time. Events are generated when clusters are created, modified, and updated, node pools are created and scaled out, and components are installed.
 *
 * @param request DescribeEventsRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeEventsResponse
 */
async function describeEventsWithOptions(request: DescribeEventsRequest, headers: map[string]string, runtime: Util.RuntimeOptions): DescribeEventsResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.clusterId)) {
    query['cluster_id'] = request.clusterId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['page_number'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['page_size'] = request.pageSize;
  }
  if (!Util.isUnset(request.type)) {
    query['type'] = request.type;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeEvents',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/events`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Queries the detailed information about a type of events, including the severity level, status, and time. Events are generated when clusters are created, modified, and updated, node pools are created and scaled out, and components are installed.
 *
 * @param request DescribeEventsRequest
 * @return DescribeEventsResponse
 */
async function describeEvents(request: DescribeEventsRequest): DescribeEventsResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return describeEventsWithOptions(request, headers, runtime);
}

model DescribeEventsForRegionRequest {
  clusterId?: string(name='cluster_id', description='The cluster ID.', example='cf62854ac2130470897be7a27ed1f****'),
  pageNumber?: long(name='page_number', description='The number of pages.', example='1'),
  pageSize?: long(name='page_size', description='The number of records on each page.', example='50'),
}

model DescribeEventsForRegionResponseBody = {
  events?: [ 
    {
      clusterId?: string(name='cluster_id', description='The cluster ID.', example='cluster-id'),
      data?: {
        level?: string(name='level', description='The severity level of the event.', example='info'),
        message?: string(name='message', description='The details of the event.', example='Start to upgrade NodePool nodePool/nodePool-A'),
        reason?: string(name='reason', description='The event status.', example='Started'),
      }(name='data', description='The description of the event.'),
      eventId?: string(name='event_id', description='The event ID.', example='A234-1234-1234'),
      source?: string(name='source', description='The event source.'),
      subject?: string(name='subject', description='The object associated with the event.', example='nodePool-id'),
      time?: string(name='time', description='The time when the event was generated.', example='2020-12-01T17:31:00Z'),
      type?: string(name='type', description='The event type.', example='nodePool_upgrade'),
    }
  ](name='events', description='The events.'),
  pageInfo?: {
    pageNumber?: long(name='page_number', description='The number of pages.', example='1'),
    pageSize?: long(name='page_size', description='The number of records on each page.', example='50'),
    totalCount?: long(name='total_count', description='The total number of entries returned.', example='3'),
  }(name='page_info', description='The pagination details.'),
}

model DescribeEventsForRegionResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeEventsForRegionResponseBody(name='body'),
}

/**
 * @summary Queries all events in a specified region.
 *
 * @param request DescribeEventsForRegionRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeEventsForRegionResponse
 */
async function describeEventsForRegionWithOptions(regionId: string, request: DescribeEventsForRegionRequest, headers: map[string]string, runtime: Util.RuntimeOptions): DescribeEventsForRegionResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.clusterId)) {
    query['cluster_id'] = request.clusterId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['page_number'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['page_size'] = request.pageSize;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeEventsForRegion',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/regions/${OpenApiUtil.getEncodeParam(regionId)}/events`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Queries all events in a specified region.
 *
 * @param request DescribeEventsForRegionRequest
 * @return DescribeEventsForRegionResponse
 */
async function describeEventsForRegion(regionId: string, request: DescribeEventsForRegionRequest): DescribeEventsForRegionResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return describeEventsForRegionWithOptions(regionId, request, headers, runtime);
}

model DescribeExternalAgentRequest {
  agentMode?: string(name='AgentMode', description='The permission mode of the agent. Valid values:

admin: the admin mode, which provides full permissions. restricted: the restricted mode, which provides partial permissions. Default value: admin.', example='admin'),
  privateIpAddress?: string(name='PrivateIpAddress', description='Specifies whether to obtain the credentials that are used to access the cluster over the internal network.

*   `true`: obtains the credentials that are used to access the cluster over the internal network.
*   `false`: obtains the credentials that are used to access the cluster over the Internet.

Default value: `false`.', example='true'),
}

model DescribeExternalAgentResponseBody = {
  config?: string(name='config', description='The agent configurations in the YAML format.', example='apiVersion: v1****'),
}

model DescribeExternalAgentResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeExternalAgentResponseBody(name='body'),
}

/**
 * @deprecated OpenAPI DescribeExternalAgent is deprecated
 *
 * @summary Queries the proxy configurations of a registered cluster by cluster ID.
 *
 * @description For more information, see [Register an external Kubernetes cluster](https://help.aliyun.com/document_detail/121053.html).
 *
 * @param request DescribeExternalAgentRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeExternalAgentResponse
 */
// Deprecated
async function describeExternalAgentWithOptions(ClusterId: string, request: DescribeExternalAgentRequest, headers: map[string]string, runtime: Util.RuntimeOptions): DescribeExternalAgentResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.agentMode)) {
    query['AgentMode'] = request.agentMode;
  }
  if (!Util.isUnset(request.privateIpAddress)) {
    query['PrivateIpAddress'] = request.privateIpAddress;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeExternalAgent',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/k8s/${OpenApiUtil.getEncodeParam(ClusterId)}/external/agent/deployment`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @deprecated OpenAPI DescribeExternalAgent is deprecated
 *
 * @summary Queries the proxy configurations of a registered cluster by cluster ID.
 *
 * @description For more information, see [Register an external Kubernetes cluster](https://help.aliyun.com/document_detail/121053.html).
 *
 * @param request DescribeExternalAgentRequest
 * @return DescribeExternalAgentResponse
 */
// Deprecated
async function describeExternalAgent(ClusterId: string, request: DescribeExternalAgentRequest): DescribeExternalAgentResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return describeExternalAgentWithOptions(ClusterId, request, headers, runtime);
}

model DescribeKubernetesVersionMetadataRequest {
  clusterType?: string(name='ClusterType', description='The cluster type that you want to use. Valid values:

*   `Kubernetes`: ACK dedicated cluster.
*   `ManagedKubernetes`: ACK managed cluster. ACK managed clusters include ACK Pro clusters, ACK Basic clusters, ACK Serverless Pro clusters, ACK Serverless Basic clusters, ACK Edge Pro clusters, and ACK Edge Basic clusters.
*   `ExternalKubernetes`: registered cluster.

This parameter is required.', example='Kubernetes'),
  kubernetesVersion?: string(name='KubernetesVersion', description='The Kubernetes version of the cluster. The Kubernetes versions supported by ACK are the same as the Kubernetes versions supported by open source Kubernetes. We recommend that you specify the latest Kubernetes version. If you do not set this parameter, the latest Kubernetes version is used.

You can create ACK clusters of the latest two Kubernetes versions in the ACK console. You can call the specific ACK API operation to create clusters of other Kubernetes versions. For more information about the Kubernetes versions supported by ACK, see [Release notes for Kubernetes versions](https://help.aliyun.com/document_detail/185269.html).', example='1.16.9-aliyun.1'),
  mode?: string(name='Mode', description='The query mode. Valid values:

*   `supported`: queries all supported Kubernetes versions.
*   `creatable`: queries only Kubernetes versions of clusters that you can create.

If you specify `KubernetesVersion`, this parameter does not take effect.

If you do not specify a query mode, Kubernetes versions of clusters that you can create are returned.', example='supported'),
  profile?: string(name='Profile', description='The scenario where clusters are used. Valid values:

*   `Default`: non-edge computing scenarios
*   `Edge`: edge computing scenarios
*   `Serverless`: serverless scenarios.

Default value: `Default`.', example='Default'),
  queryUpgradableVersion?: boolean(name='QueryUpgradableVersion', description='Specify whether to query the Kubernetes versions available for updates. This parameter takes effect only when the KubernetesVersion parameter is specified.', example='1.30.1-aliyun.1'),
  region?: string(name='Region', description='The region ID of the cluster.

This parameter is required.', example='cn-beijing'),
  runtime?: string(name='runtime', description='The container runtime type that you want to use. You can specify a runtime type to query only OS images that support the runtime type. Valid values:

*   `docker`: Docker
*   `containerd`: containerd
*   `Sandboxed-Container.runv`: Sandboxed-Container

If you specify a runtime type, only the OS images that support the specified runtime type are returned.

Otherwise, all OS images are returned.', example='docker'),
}

model DescribeKubernetesVersionMetadataResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: [ 
    {
      capabilities?: map[string]any(name='capabilities', description='Features of the queried Kubernetes version.', example='{
      "AnyAZ": true,
      "ChargeType": "PostPaid"
}'),
      images?: [ 
        {
          imageId?: string(name='image_id', description='The image ID.', example='centos_7_7_x64_20G_alibase_20200426.vhd'),
          imageName?: string(name='image_name', description='The image name.', example='CentOS 7.7'),
          platform?: string(name='platform', description='The OS platform. Valid values:

*   `AliyunLinux`
*   `CentOS`
*   `Windows`
*   `WindowsCore`', example='CentOS'),
          osVersion?: string(name='os_version', description='The version of the image.', example='7.7'),
          imageType?: string(name='image_type', description='The type of OS distribution that you want to use. To specify the node OS, we recommend that you use this parameter. Valid values:

*   `CentOS`
*   `AliyunLinux`
*   `AliyunLinux Qboot`
*   `AliyunLinuxUEFI`
*   `AliyunLinux3`
*   `Windows`
*   `WindowsCore`
*   `AliyunLinux3Arm64`
*   `ContainerOS`', example='centos_7_7_20'),
          osType?: string(name='os_type', description='The type of OS. Examples:

*   `Windows`
*   `Linux`', example='Linux'),
          imageCategory?: string(name='image_category', description='The type of image. Valid values:

*   `system`: public image
*   `self`: custom image
*   `others`: shared image from other Alibaba Cloud accounts
*   `marketplace`: image from the marketplace', example='system'),
          architecture?: string(name='architecture', description='The architecture of the image.', example='x86_64'),
        }
      ](name='images', description='The OS images that are returned.'),
      metaData?: map[string]any(name='meta_data', description='The metadata of the Kubernetes version.', example='{
      "KubernetesVersion": "1.31.1-aliyun.1",
      "SubClass": "default",
      "ServiceCIDR": ""
}'),
      runtimes?: [
        Runtime
      ](name='runtimes', description='The container runtime configurations.'),
      version?: string(name='version', description='The Kubernetes version supported by ACK. For more information, see [Release notes for Kubernetes versions](https://help.aliyun.com/document_detail/185269.html).', example='1.16.9-aliyun.1'),
      releaseDate?: string(name='release_date', description='The release date of the Kubernetes version.', example='2023-04-30T00:00:00Z'),
      expirationDate?: string(name='expiration_date', description='The expiration date of the Kubernetes version.', example='2025-04-30T00:00:00Z'),
      creatable?: boolean(name='creatable', description='Indicates whether you can create clusters that run the Kubernetes version.', example='true'),
      upgradableVersions?: [ string ](name='upgradable_versions', description='The list of available versions for updates.'),
    }
  ](name='body'),
}

/**
 * @summary Queries the detailed information about Kubernetes versions, including the version number, release date, expiration date, compatible OSs, and runtime.
 *
 * @param request DescribeKubernetesVersionMetadataRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeKubernetesVersionMetadataResponse
 */
async function describeKubernetesVersionMetadataWithOptions(request: DescribeKubernetesVersionMetadataRequest, headers: map[string]string, runtime: Util.RuntimeOptions): DescribeKubernetesVersionMetadataResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.clusterType)) {
    query['ClusterType'] = request.clusterType;
  }
  if (!Util.isUnset(request.kubernetesVersion)) {
    query['KubernetesVersion'] = request.kubernetesVersion;
  }
  if (!Util.isUnset(request.mode)) {
    query['Mode'] = request.mode;
  }
  if (!Util.isUnset(request.profile)) {
    query['Profile'] = request.profile;
  }
  if (!Util.isUnset(request.queryUpgradableVersion)) {
    query['QueryUpgradableVersion'] = request.queryUpgradableVersion;
  }
  if (!Util.isUnset(request.region)) {
    query['Region'] = request.region;
  }
  if (!Util.isUnset(request.runtime)) {
    query['runtime'] = request.runtime;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeKubernetesVersionMetadata',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/api/v1/metadata/versions`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'array',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Queries the detailed information about Kubernetes versions, including the version number, release date, expiration date, compatible OSs, and runtime.
 *
 * @param request DescribeKubernetesVersionMetadataRequest
 * @return DescribeKubernetesVersionMetadataResponse
 */
async function describeKubernetesVersionMetadata(request: DescribeKubernetesVersionMetadataRequest): DescribeKubernetesVersionMetadataResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return describeKubernetesVersionMetadataWithOptions(request, headers, runtime);
}

model DescribeNodePoolVulsRequest {
  necessity?: string(name='necessity', description='The priority to fix the vulnerability. Separate multiple priorities with commas (,). Valid values:

*   `asap`: high
*   `later`: medium
*   `nntf`: low', example='asap'),
}

model DescribeNodePoolVulsResponseBody = {
  vulRecords?: [ 
    {
      instanceId?: string(name='instance_id', description='The ID of the node.', example='i-t4n2qolb0wtzt0pz****'),
      nodeName?: string(name='node_name', description='The node name. This name is the identifier of the node in the cluster.', example='cn-hangzhou.192.168.x.x'),
      vulList?: [ 
        {
          aliasName?: string(name='alias_name', description='The alias of the vulnerability.', example='RHSA-2019:3197-Important: sudo security update'),
          cveList?: [ string ](name='cve_list', description='A list of CVE names corresponding to the vulnerabilities.'),
          name?: string(name='name', description='The name of the vulnerability.', example='oval:com.redhat.rhsa:def:20193197'),
          necessity?: string(name='necessity', description='The severity level of the vulnerability.

Valid values:

*   nntf: You can ignore the vulnerability.
*   later: You can fix the vulnerability later.
*   asap: You need to fix the vulnerability at the earliest opportunity.', example='asap'),
          needReboot?: boolean(name='need_reboot', description='Indicates whether a restart is required.', example='false'),
        }
      ](name='vul_list', description='A list of vulnerabilities.'),
    }
  ](name='vul_records', description='The node pool vulnerabilities.'),
  vulsFixServicePurchased?: boolean(name='vuls_fix_service_purchased', description='Whether the Cloud Security CVE Remediation Service has been purchased', example='false'),
}

model DescribeNodePoolVulsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeNodePoolVulsResponseBody(name='body'),
}

/**
 * @summary Queries the vulnerability information of a node pool, such as vulnerability names and severity levels, by specifying the ID of the node pool. We recommend that you periodically scan node pools for vulnerabilities to enhance cluster security.
 *
 * @param request DescribeNodePoolVulsRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeNodePoolVulsResponse
 */
async function describeNodePoolVulsWithOptions(clusterId: string, nodepoolId: string, request: DescribeNodePoolVulsRequest, headers: map[string]string, runtime: Util.RuntimeOptions): DescribeNodePoolVulsResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.necessity)) {
    query['necessity'] = request.necessity;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeNodePoolVuls',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/clusters/${OpenApiUtil.getEncodeParam(clusterId)}/nodepools/${OpenApiUtil.getEncodeParam(nodepoolId)}/vuls`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Queries the vulnerability information of a node pool, such as vulnerability names and severity levels, by specifying the ID of the node pool. We recommend that you periodically scan node pools for vulnerabilities to enhance cluster security.
 *
 * @param request DescribeNodePoolVulsRequest
 * @return DescribeNodePoolVulsResponse
 */
async function describeNodePoolVuls(clusterId: string, nodepoolId: string, request: DescribeNodePoolVulsRequest): DescribeNodePoolVulsResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return describeNodePoolVulsWithOptions(clusterId, nodepoolId, request, headers, runtime);
}

model DescribePoliciesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: object(name='body'),
}

/**
 * @summary Queries a list of security policies. Container Service for Kubernetes (ACK) clusters offer a variety of built-in container security policies, such as Compliance, Infra, K8s-general, and pod security policy (PSP). You can use these policies to ensure the security of containers running in a production environment.
 *
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribePoliciesResponse
 */
async function describePoliciesWithOptions(headers: map[string]string, runtime: Util.RuntimeOptions): DescribePoliciesResponse {
  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
  };
  var params = new OpenApi.Params{
    action = 'DescribePolicies',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/policies`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Queries a list of security policies. Container Service for Kubernetes (ACK) clusters offer a variety of built-in container security policies, such as Compliance, Infra, K8s-general, and pod security policy (PSP). You can use these policies to ensure the security of containers running in a production environment.
 *
 * @return DescribePoliciesResponse
 */
async function describePolicies(): DescribePoliciesResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return describePoliciesWithOptions(headers, runtime);
}

model DescribePolicyDetailsResponseBody = {
  action?: string(name='action', description='The action of the policy. Valid values:

*   `enforce`: blocks deployments that match the policy.
*   `inform`: generates alerts for deployments that match the policy.', example='enforce'),
  category?: string(name='category', description='The type of the policy.', example='k8s-general'),
  description?: string(name='description', description='The description of the policy.', example='Requires container images to begin with a repo string from a specified list'),
  isDeleted?: int32(name='is_deleted', description='Indicates whether the policy is deleted. Valid values:

*   0: The policy is not deleted.
*   1: The policy is deleted.', example='0'),
  name?: string(name='name', description='The name of the policy.', example='ACKAllowedRepos'),
  noConfig?: int32(name='no_config', description='Indicates whether parameters are required. Valid values:

*   0: Parameters are required.
*   1: Parameters are optional.', example='0'),
  severity?: string(name='severity', description='The severity level of the policy. Valid values:

*   `high`
*   `medium`
*   `low`', example='high'),
  template?: string(name='template', description='The content of the policy.', example='For more information, see sample requests.'),
}

model DescribePolicyDetailsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribePolicyDetailsResponseBody(name='body'),
}

/**
 * @summary Queries the detailed information about a policy. The information includes the content, action, and severity level of the policy. Container Service for Kubernetes (ACK) provides the following types of predefined security policies: Compliance, Infra, K8s-general, and pod security policy (PSP). These policies ensure that containers are running in the production environment in a secure manner.
 *
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribePolicyDetailsResponse
 */
async function describePolicyDetailsWithOptions(policyName: string, headers: map[string]string, runtime: Util.RuntimeOptions): DescribePolicyDetailsResponse {
  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
  };
  var params = new OpenApi.Params{
    action = 'DescribePolicyDetails',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/policies/${OpenApiUtil.getEncodeParam(policyName)}`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Queries the detailed information about a policy. The information includes the content, action, and severity level of the policy. Container Service for Kubernetes (ACK) provides the following types of predefined security policies: Compliance, Infra, K8s-general, and pod security policy (PSP). These policies ensure that containers are running in the production environment in a secure manner.
 *
 * @return DescribePolicyDetailsResponse
 */
async function describePolicyDetails(policyName: string): DescribePolicyDetailsResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return describePolicyDetailsWithOptions(policyName, headers, runtime);
}

model DescribePolicyGovernanceInClusterResponseBody = {
  admitLog?: {
    count?: long(name='count', description='The number of audit log entries.', example='100'),
    log?: {
      clusterId?: string(name='cluster_id', description='The cluster ID.', example='c8155823d057948c69a****'),
      constraintKind?: string(name='constraint_kind', description='The policy type.', example='ACKAllowedRepos'),
      msg?: string(name='msg', description='The message that appears when an event is generated by a policy.', example='d4hdhs*****'),
      resourceKind?: string(name='resource_kind', description='The resource type.', example='Pod'),
      resourceName?: string(name='resource_name', description='The resource name.', example='nginx-deployment-basic2-84ccb74bfc-df22p'),
      resourceNamespace?: string(name='resource_namespace', description='The namespace to which the resource belongs.', example='default'),
    }(name='log', description='The audit log content.'),
    progress?: string(name='progress', description='The status of the query. Valid values:

*   `Complete`: The query succeeded and the complete query result is returned.
*   `Incomplete`: The query succeeded but the query result is incomplete. To obtain the complete query result, you must repeat the request.', example='Complete'),
  }(name='admit_log', description='The audit logs of the policies in the cluster.'),
  onState?: [ 
    {
      enabledCount?: int32(name='enabled_count', description='The number of policies that are enabled.', example='3'),
      severity?: string(name='severity', description='The severity level of the policy.', example='high'),
      total?: int32(name='total', description='The total number of policies of the severity level.', example='8'),
    }
  ](name='on_state', description='Details about the policies of different severity levels that are enabled for the cluster.'),
  totalViolations?: {
    deny?: {
      severity?: string(name='severity', description='The severity level of the policy.', example='high'),
      violations?: long(name='violations', description='The number of blocking events that are triggered.', example='0'),
    }(name='deny', description='Details about the blocking events that are triggered by the policies of each severity level.'),
    warn?: {
      severity?: string(name='severity', description='The severity level of the policy.', example='low'),
      violations?: long(name='violations', description='The number of alerting events that are triggered.', example='5'),
    }(name='warn', description='Details about the alerting events that are triggered by the policies of each severity level.'),
  }(name='totalViolations', description='Details about the blocking and alerting events that are triggered by policies of different severity levels.'),
  violations?: {
    deny?: {
      policyDescription?: string(name='policyDescription', description='The policy description.', example='Requires container images to begin with a repo string from a specified list.'),
      policyName?: string(name='policyName', description='The policy name.', example='policy-gatekeeper-ackallowedrepos'),
      severity?: string(name='severity', description='The severity level of the policy.', example='high'),
      violations?: long(name='violations', description='The total number of blocking events that are triggered by the policy.', example='11'),
    }(name='deny', description='Details about the blocking events that are triggered by each policy.'),
    warn?: {
      policyDescription?: string(name='policyDescription', description='The policy description.', example='Controls Linux capabilities.'),
      policyName?: string(name='policyName', description='The policy name.', example='policy-gatekeeper-ackpspcapabilities'),
      severity?: string(name='severity', description='The severity level of the policy.', example='high'),
      violations?: long(name='violations', description='The total number of alerting events that are triggered by the policy.', example='81'),
    }(name='warn', description='Details about the alerting events that are triggered by the policies of each severity level.'),
  }(name='violations', description='Details about the blocking and alerting events that are triggered by different policies.'),
}

model DescribePolicyGovernanceInClusterResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribePolicyGovernanceInClusterResponseBody(name='body'),
}

/**
 * @summary Container Service for Kubernetes (ACK) clusters offer a variety of built-in container security policies, such as Compliance, Infra, K8s-general, and pod security policy (PSP). You can use these policies to ensure the security of containers running in a production environment. You can call the DescribePolicyGovernanceInCluster operation to query the details of policies for an ACK cluster. For example, you can query the number of policies that are enabled per severity level, the audit logs of policies, and the blocking and alerting information.
 *
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribePolicyGovernanceInClusterResponse
 */
async function describePolicyGovernanceInClusterWithOptions(clusterId: string, headers: map[string]string, runtime: Util.RuntimeOptions): DescribePolicyGovernanceInClusterResponse {
  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
  };
  var params = new OpenApi.Params{
    action = 'DescribePolicyGovernanceInCluster',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/clusters/${OpenApiUtil.getEncodeParam(clusterId)}/policygovernance`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Container Service for Kubernetes (ACK) clusters offer a variety of built-in container security policies, such as Compliance, Infra, K8s-general, and pod security policy (PSP). You can use these policies to ensure the security of containers running in a production environment. You can call the DescribePolicyGovernanceInCluster operation to query the details of policies for an ACK cluster. For example, you can query the number of policies that are enabled per severity level, the audit logs of policies, and the blocking and alerting information.
 *
 * @return DescribePolicyGovernanceInClusterResponse
 */
async function describePolicyGovernanceInCluster(clusterId: string): DescribePolicyGovernanceInClusterResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return describePolicyGovernanceInClusterWithOptions(clusterId, headers, runtime);
}

model DescribePolicyInstancesRequest {
  instanceName?: string(name='instance_name', description='The name of the policy instance that you want to query.', example='allowed-repos-cz4s2'),
  policyName?: string(name='policy_name', description='The name of the policy that you want to query.', example='ACKPSPCapabilities'),
}

model DescribePolicyInstancesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: [ 
    {
      aliUid?: string(name='ali_uid', description='The UID of the Alibaba Cloud account that is used to deploy the policy instance.', example='16298168****'),
      clusterId?: string(name='cluster_id', description='The ID of the cluster.', example='c8155823d057948c69a****'),
      instanceName?: string(name='instance_name', description='The name of the policy instance.', example='no-env-var-secrets-****'),
      policyName?: string(name='policy_name', description='The name of the policy.', example='ACKPSPCapabilities'),
      policyCategory?: string(name='policy_category', description='The type of the policy.', example='k8s-general'),
      policyDescription?: string(name='policy_description', description='The description of the policy template.', example='Restricts secrets used in pod envs'),
      policyParameters?: string(name='policy_parameters', description='The parameters of the policy instance.', example='"restrictedNamespaces": [ "test" ]'),
      policySeverity?: string(name='policy_severity', description='The severity level of the policy instance.', example='low'),
      policyScope?: string(name='policy_scope', description='The applicable scope of the policy instance.

A value of \\\\* indicates all namespaces in the cluster. This is the default value.

Multiple namespaces are separated by commas (,).', example='*'),
      policyAction?: string(name='policy_action', description='The action of the policy. Valid values:

*   `deny`: Deployments that match the policy are denied.
*   `warn`: Alerts are generated for deployments that match the policy.', example='deny'),
      created?: string(name='Created', description='The creation time of the instance. This parameter is deprecated.', example='2024-10-29T18:09:12+08:00', deprecated=true),
      updated?: string(name='Updated', description='The update time of the instance. This parameter is deprecated.', example='2024-10-29T18:09:12+08:00', deprecated=true),
      resourceId?: string(name='resource_id', description='The ID of the resource. This parameter is deprecated.', example='123456***', deprecated=true),
      totalViolations?: long(name='total_violations', description='The number of violations processed in the cluster. This parameter is deprecated.', example='0', deprecated=true),
      isDeleted?: long(name='is_deleted', description='The status of the deletion. This parameter is deprecated.', example='0', deprecated=true),
    }
  ](name='body'),
}

/**
 * @summary Queries the detailed information about policy instances of the specified type in a Container Service for Kubernetes (ACK) cluster, such as the policy description and severity level. You can choose a type of security policy for an ACK cluster, specify the action and applicable scope of the policy, and then create and deploy a policy instance.
 *
 * @param request DescribePolicyInstancesRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribePolicyInstancesResponse
 */
async function describePolicyInstancesWithOptions(clusterId: string, request: DescribePolicyInstancesRequest, headers: map[string]string, runtime: Util.RuntimeOptions): DescribePolicyInstancesResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.instanceName)) {
    query['instance_name'] = request.instanceName;
  }
  if (!Util.isUnset(request.policyName)) {
    query['policy_name'] = request.policyName;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribePolicyInstances',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/clusters/${OpenApiUtil.getEncodeParam(clusterId)}/policies`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'array',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Queries the detailed information about policy instances of the specified type in a Container Service for Kubernetes (ACK) cluster, such as the policy description and severity level. You can choose a type of security policy for an ACK cluster, specify the action and applicable scope of the policy, and then create and deploy a policy instance.
 *
 * @param request DescribePolicyInstancesRequest
 * @return DescribePolicyInstancesResponse
 */
async function describePolicyInstances(clusterId: string, request: DescribePolicyInstancesRequest): DescribePolicyInstancesResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return describePolicyInstancesWithOptions(clusterId, request, headers, runtime);
}

model DescribePolicyInstancesStatusResponseBody = {
  instancesSeverityCount?: map[string]any(name='instances_severity_count', description='The number of policy instances that are deployed in the cluster at different severity levels.', example='{ "high": 11,     "medium": 1  }'),
  policyInstances?: [ 
    {
      policyCategory?: string(name='policy_category', description='The type of the policy. For more information about different types of policies and their descriptions, see [Predefined security policies of ACK](https://help.aliyun.com/document_detail/359819.html).', example='compliance'),
      policyDescription?: string(name='policy_description', description='The description of the policy.', example='Restricts use of the cluster-admin role.'),
      policyInstancesCount?: long(name='policy_instances_count', description='The number of policy instances that are deployed. If this parameter is empty, no policy instance is deployed.', example='1'),
      policyName?: string(name='policy_name', description='The name of the policy.', example='ACKRestrictRoleBindings'),
      policySeverity?: string(name='policy_severity', description='The severity level of the policy.', example='medium'),
    }
  ](name='policy_instances', description='The number of policy instances of each policy type.'),
}

model DescribePolicyInstancesStatusResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribePolicyInstancesStatusResponseBody(name='body'),
}

/**
 * @summary Queries the deployment of policy instances in the current Container Service for Kubernetes (ACK) cluster, including the number of policy instances of each type and the number of policy types of each severity level.
 *
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribePolicyInstancesStatusResponse
 */
async function describePolicyInstancesStatusWithOptions(clusterId: string, headers: map[string]string, runtime: Util.RuntimeOptions): DescribePolicyInstancesStatusResponse {
  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
  };
  var params = new OpenApi.Params{
    action = 'DescribePolicyInstancesStatus',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/clusters/${OpenApiUtil.getEncodeParam(clusterId)}/policies/status`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Queries the deployment of policy instances in the current Container Service for Kubernetes (ACK) cluster, including the number of policy instances of each type and the number of policy types of each severity level.
 *
 * @return DescribePolicyInstancesStatusResponse
 */
async function describePolicyInstancesStatus(clusterId: string): DescribePolicyInstancesStatusResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return describePolicyInstancesStatusWithOptions(clusterId, headers, runtime);
}

model DescribeResourcesDeleteProtectionRequest {
  namespace?: string(name='namespace', description='The namespace to which the resource belongs.', example='default'),
  resources?: string(name='resources', description='The name of the resource that you want to query. Separate multiple resource names with commas (,).', example='test1,test2'),
}

model DescribeResourcesDeleteProtectionResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: [ 
    {
      name?: string(name='name', description='The name of the resource.

This parameter is required.', example='test'),
      namespace?: string(name='namespace', description='The namespace to which the resource belongs.', example='default'),
      resource?: string(name='resource', description='The type of resource for which deletion protection is enabled.', example='namespaces'),
      protection?: boolean(name='protection', description='Indicates whether deletion protection is enabled.

*   true: deletion protection is enabled.
*   false: deletion protection is disabled.

Default value: false', example='false'),
    }
  ](name='body'),
}

/**
 * @summary Queries whether the deletion protection feature is enabled for the specified resources. The resources that you can query include namespaces and Services.
 *
 * @param request DescribeResourcesDeleteProtectionRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeResourcesDeleteProtectionResponse
 */
async function describeResourcesDeleteProtectionWithOptions(ClusterId: string, ResourceType: string, request: DescribeResourcesDeleteProtectionRequest, headers: map[string]string, runtime: Util.RuntimeOptions): DescribeResourcesDeleteProtectionResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.namespace)) {
    query['namespace'] = request.namespace;
  }
  if (!Util.isUnset(request.resources)) {
    query['resources'] = request.resources;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeResourcesDeleteProtection',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/clusters/${OpenApiUtil.getEncodeParam(ClusterId)}/resources/${OpenApiUtil.getEncodeParam(ResourceType)}/protection`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'array',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Queries whether the deletion protection feature is enabled for the specified resources. The resources that you can query include namespaces and Services.
 *
 * @param request DescribeResourcesDeleteProtectionRequest
 * @return DescribeResourcesDeleteProtectionResponse
 */
async function describeResourcesDeleteProtection(ClusterId: string, ResourceType: string, request: DescribeResourcesDeleteProtectionRequest): DescribeResourcesDeleteProtectionResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return describeResourcesDeleteProtectionWithOptions(ClusterId, ResourceType, request, headers, runtime);
}

model DescribeSubaccountK8sClusterUserConfigRequest {
  privateIpAddress?: boolean(name='PrivateIpAddress', description='Specifies whether to obtain the kubeconfig file used to connect to the cluster over the internal network. Valid values:

*   `true`: Obtain the kubeconfig file used to connect to the cluster over the internal network.
*   `false`: Obtain the kubeconfig file used to connect to the cluster over the Internet.

Default value: `false`.', example='true'),
  temporaryDurationMinutes?: long(name='TemporaryDurationMinutes', description='The validity period of the temporary kubeconfig file. Unit: minutes.

Valid values: 15 to 4320 (three days).

> If you leave this parameter empty, the system sets a longer validity period and returns the value in the expiration parameter of the response.', example='15'),
}

model DescribeSubaccountK8sClusterUserConfigResponseBody = {
  config?: string(name='config', description='The cluster kubeconfig file. For more information about the content of the kubeconfig file, see [Configure cluster credentials](https://help.aliyun.com/document_detail/86494.html).

This parameter is required.', example='apiVersion: v1****'),
  expiration?: string(name='expiration', description='The expiration date of the kubeconfig file. The value is the UTC time displayed in RFC3339 format.', example='2024-03-10T09:56:17Z'),
}

model DescribeSubaccountK8sClusterUserConfigResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeSubaccountK8sClusterUserConfigResponseBody(name='body'),
}

/**
 * @summary Queries or issues the kubeconfig credentials of a Resource Access Management (RAM) user or RAM role of the account. If you are the permission manager of a Container Service for Kubernetes (ACK) cluster, you can issue the kubeconfig credentials to a specific RAM user or RAM role of the account by using the Alibaba Cloud account. The kubeconfig credentials, which are used to connect to the ACK cluster, contain the identity information about the RAM user or RAM role.
 *
 * @description You can call this operation only by using an Alibaba Cloud account.
 *
 * @param request DescribeSubaccountK8sClusterUserConfigRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeSubaccountK8sClusterUserConfigResponse
 */
async function describeSubaccountK8sClusterUserConfigWithOptions(ClusterId: string, Uid: string, request: DescribeSubaccountK8sClusterUserConfigRequest, headers: map[string]string, runtime: Util.RuntimeOptions): DescribeSubaccountK8sClusterUserConfigResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.privateIpAddress)) {
    query['PrivateIpAddress'] = request.privateIpAddress;
  }
  if (!Util.isUnset(request.temporaryDurationMinutes)) {
    query['TemporaryDurationMinutes'] = request.temporaryDurationMinutes;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeSubaccountK8sClusterUserConfig',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/k8s/${OpenApiUtil.getEncodeParam(ClusterId)}/users/${OpenApiUtil.getEncodeParam(Uid)}/user_config`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Queries or issues the kubeconfig credentials of a Resource Access Management (RAM) user or RAM role of the account. If you are the permission manager of a Container Service for Kubernetes (ACK) cluster, you can issue the kubeconfig credentials to a specific RAM user or RAM role of the account by using the Alibaba Cloud account. The kubeconfig credentials, which are used to connect to the ACK cluster, contain the identity information about the RAM user or RAM role.
 *
 * @description You can call this operation only by using an Alibaba Cloud account.
 *
 * @param request DescribeSubaccountK8sClusterUserConfigRequest
 * @return DescribeSubaccountK8sClusterUserConfigResponse
 */
async function describeSubaccountK8sClusterUserConfig(ClusterId: string, Uid: string, request: DescribeSubaccountK8sClusterUserConfigRequest): DescribeSubaccountK8sClusterUserConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return describeSubaccountK8sClusterUserConfigWithOptions(ClusterId, Uid, request, headers, runtime);
}

model DescribeTaskInfoResponseBody = {
  clusterId?: string(name='cluster_id', description='The cluster ID.', example='c78592bfe92244365b3c3ad47f1de****'),
  created?: string(name='created', description='The time when the task was created.', example='2020-11-10T16:02:04+08:00'),
  currentStage?: string(name='current_stage', description='The current stage of the task.', example='DrainNodes'),
  error?: {
    code?: string(name='code', description='The error code returned.', example='400'),
    message?: string(name='message', description='The error message returned.', example='failed to xxx'),
  }(name='error', description='The error returned for the task.'),
  events?: [ 
    {
      action?: string(name='action', description='The action of the event.', example='start'),
      level?: string(name='level', description='The severity level of the event.', example='Normal'),
      message?: string(name='message', description='The message about the event.', example='start to xxx'),
      reason?: string(name='reason', description='The cause of the event.', example='NodePoolUpgradeStart'),
      source?: string(name='source', description='The source of the event.', example='ACK'),
      timestamp?: string(name='timestamp', description='The timestamp when the event was generated.', example='1669706229286'),
    }
  ](name='events', description='The event generated by the task.'),
  parameters?: map[string]any(name='parameters', description='The task parameters.'),
  stages?: [ 
    {
      endTime?: string(name='end_time', description='The end time of the stage.', example='2022-12-15 23:00:00'),
      message?: string(name='message', description='The message about the stage.', example='success to xxxxx'),
      outputs?: map[string]any(name='outputs', description='The output generated at the stage.'),
      startTime?: string(name='start_time', description='The start time of the stage.', example='2022-12-15 23:00:00'),
      state?: string(name='state', description='The status of the stage.', example='running'),
    }
  ](name='stages', description='Detailed information about the stage of the task.'),
  state?: string(name='state', description='The status of the task. Valid values:

*   `running`: The task is running.
*   `failed`: The task failed.
*   `success`: The task is complete.', example='running'),
  target?: {
    id?: string(name='id', description='The ID of the object.', example='c78592bfe92244365b3c3ad47f1de****'),
    type?: string(name='type', description='The type of the object.', example='cluster'),
  }(name='target', description='The object of the task.'),
  taskId?: string(name='task_id', description='The task ID.', example='T-5faa48fb31b6b8078d000006'),
  taskResult?: [ 
    {
      data?: string(name='data', description='The resources that are managed by the task. For a scale-out task, the value of this parameter is the ID of the instance that is added by the task.', example='i-xxx'),
      status?: string(name='status', description='The status of the scale-out task. Valid values:

*   `success`: The scale-out task is successful.
*   `success`: The scale-out task failed.
*   `initial`: The scale-out task is being initialized.', example='success'),
    }
  ](name='task_result', description='The execution details of the task.'),
  taskType?: string(name='task_type', description='The task type. A value of `cluster_scaleout` indicates a scale-out task.', example='cluster_scaleout'),
  updated?: string(name='updated', description='The time when the task was updated.', example='2020-11-10T16:03:06+08:00'),
}

model DescribeTaskInfoResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeTaskInfoResponseBody(name='body'),
}

/**
 * @summary Queries detailed information about a task, such as the task type, status, and progress.
 *
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeTaskInfoResponse
 */
async function describeTaskInfoWithOptions(taskId: string, headers: map[string]string, runtime: Util.RuntimeOptions): DescribeTaskInfoResponse {
  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
  };
  var params = new OpenApi.Params{
    action = 'DescribeTaskInfo',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/tasks/${OpenApiUtil.getEncodeParam(taskId)}`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Queries detailed information about a task, such as the task type, status, and progress.
 *
 * @return DescribeTaskInfoResponse
 */
async function describeTaskInfo(taskId: string): DescribeTaskInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return describeTaskInfoWithOptions(taskId, headers, runtime);
}

model DescribeTemplateAttributeRequest {
  templateType?: string(name='template_type', description='The type of template. The value can be a custom value.

*   If the parameter is set to `kubernetes`, the template is displayed on the Templates page in the console.
*   If the parameter is set to `compose`, the template is displayed on the Container Service - Swarm page in the console. Container Service for Swarm is deprecated.
*   If the value of the parameter is not `kubernetes`, the template is not displayed on the Templates page in the console. We recommend that you set the parameter to `kubernetes`.

Default value: `kubernetes`.', example='kubernetes'),
}

model DescribeTemplateAttributeResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: [ 
    {
      id?: string(name='id', description='The ID of the template. When you update a template, a new template ID is generated.', example='72d20cf8-a533-4ea9-a10d-e7630d3d****'),
      acl?: string(name='acl', description='The access control policy of the template.', example='private'),
      name?: string(name='name', description='The name of the template.', example='web'),
      template?: string(name='template', description='The template content in the YAML format.', example='apiVersion: V1\\\\n***'),
      templateType?: string(name='template_type', description='The type of template. The value can be a custom value.

*   If the parameter is set to `kubernetes`, the template is displayed on the Templates page in the console.
*   If the parameter is set to `compose`, the template is displayed on the Container Service - Swarm page in the console. Container Service for Swarm is deprecated.
*   If the value of the parameter is not `kubernetes`, the template is not displayed on the Templates page in the console. We recommend that you set the parameter to `kubernetes`.

Default value: `kubernetes`.', example='kubernetes'),
      description?: string(name='description', description='The description of the template.', example='test template'),
      tags?: string(name='tags', description='The label of the template.', example='sa'),
      templateWithHistId?: string(name='template_with_hist_id', description='The unique ID of the template. The value remains unchanged after the template is updated.', example='874ec485-e7e6-4373-8a3b-47bde8ae****'),
      created?: string(name='created', description='The time when the template was created.', example='2020-09-16T19:21:29+08:00'),
      updated?: string(name='updated', description='The time when the template was updated.', example='2020-09-16T19:21:29+08:00'),
    }
  ](name='body'),
}

/**
 * @summary An orchestration template defines and describes a group of Kubernetes resources. It declaratively describes the configuration of an application or how an application runs. You can call the DescribeTemplates API operation to query orchestration templates and their detailed information, including access permissions, YAML content, and labels.
 *
 * @param request DescribeTemplateAttributeRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeTemplateAttributeResponse
 */
async function describeTemplateAttributeWithOptions(TemplateId: string, request: DescribeTemplateAttributeRequest, headers: map[string]string, runtime: Util.RuntimeOptions): DescribeTemplateAttributeResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.templateType)) {
    query['template_type'] = request.templateType;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeTemplateAttribute',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/templates/${OpenApiUtil.getEncodeParam(TemplateId)}`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'array',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary An orchestration template defines and describes a group of Kubernetes resources. It declaratively describes the configuration of an application or how an application runs. You can call the DescribeTemplates API operation to query orchestration templates and their detailed information, including access permissions, YAML content, and labels.
 *
 * @param request DescribeTemplateAttributeRequest
 * @return DescribeTemplateAttributeResponse
 */
async function describeTemplateAttribute(TemplateId: string, request: DescribeTemplateAttributeRequest): DescribeTemplateAttributeResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return describeTemplateAttributeWithOptions(TemplateId, request, headers, runtime);
}

model DescribeTemplatesRequest {
  pageNum?: long(name='page_num', description='The page number.

Default value: 1.', example='1'),
  pageSize?: long(name='page_size', description='The number of entries per page.

Default value: 10.', example='10'),
  templateType?: string(name='template_type', description='The type of template. This parameter can be set to a custom value.

*   If the parameter is set to `kubernetes`, the template is displayed on the Templates page in the console.
*   If you set the parameter to `compose`, the template is not displayed on the Templates page in the console.

Default value: `kubernetes`.', example='kubernetes'),
}

model DescribeTemplatesResponseBody = {
  pageInfo?: {
    pageNumber?: long(name='page_number', description='The page number.', example='20'),
    pageSize?: long(name='page_size', description='The number of entries per page.', example='3'),
    totalCount?: long(name='total_count', description='The total number of entries returned.', example='50'),
  }(name='page_info', description='The pagination information.'),
  templates?: [ 
    {
      acl?: string(name='acl', description='The access control policy of the template. Valid values:

*   `private`: The template is private.
*   `public`: The template is public.
*   `shared`: The template can be shared.

Default value: `private`.', example='private'),
      created?: string(name='created', description='The time when the template was created.', example='2020-06-10T16:30:16+08:00'),
      description?: string(name='description', description='The description of the template.', example='a web server'),
      id?: string(name='id', description='The ID of the template.', example='874ec485-e7e6-4373-8a3b-47bde8ae789f'),
      name?: string(name='name', description='The name of the template.', example='webserver'),
      tags?: string(name='tags', description='The label of the template. By default, the value is the name of the template.', example='kubernetes'),
      template?: string(name='template', description='The template content in the YAML format.', example='apiVersion: apps/v1\\\\nkind: Deployment\\\\nmetadata:\\\\n  name: nginx-deployment-basic\\\\n  labels:\\\\n    app: nginx\\\\nspec:\\\\n  replicas: 2\\\\n  selector:\\\\n    matchLabels:\\\\n      app: nginx\\\\n  template:\\\\n    metadata:\\\\n      labels:\\\\n        app: nginx\\\\n    spec:\\\\n      containers:\\\\n      - name: nginx\\\\n        image: busybox:latest\\\\n        ports:\\\\n        - containerPort: 80'),
      templateType?: string(name='template_type', description='The type of template. This parameter can be set to a custom value.

*   If the parameter is set to `kubernetes`, the template is displayed on the Templates page in the console.
*   If the parameter is set to `compose`, the template is displayed on the Container Service - Swarm page in the console. However, Container Service for Swarm is deprecated.', example='kubernetes'),
      templateWithHistId?: string(name='template_with_hist_id', description='The ID of the parent template. The value of `template_with_hist_id` is the same for each template version. This allows you to manage different template versions.', example='ad81d115-7c8b-47e7-a222-9c28d7f6e588'),
      updated?: string(name='updated', description='The time when the template was updated.', example='2020-06-10T16:30:16+08:00'),
    }
  ](name='templates', description='The list of returned templates.'),
}

model DescribeTemplatesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeTemplatesResponseBody(name='body'),
}

/**
 * @summary An orchestration template defines and describes a group of Kubernetes resources. It declaratively describes the configuration of an application or how an application runs. You can call the DescribeTemplates API operation to query orchestration templates and their detailed information, including access permissions, YAML content, and labels.
 *
 * @param request DescribeTemplatesRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeTemplatesResponse
 */
async function describeTemplatesWithOptions(request: DescribeTemplatesRequest, headers: map[string]string, runtime: Util.RuntimeOptions): DescribeTemplatesResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.pageNum)) {
    query['page_num'] = request.pageNum;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['page_size'] = request.pageSize;
  }
  if (!Util.isUnset(request.templateType)) {
    query['template_type'] = request.templateType;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeTemplates',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/templates`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary An orchestration template defines and describes a group of Kubernetes resources. It declaratively describes the configuration of an application or how an application runs. You can call the DescribeTemplates API operation to query orchestration templates and their detailed information, including access permissions, YAML content, and labels.
 *
 * @param request DescribeTemplatesRequest
 * @return DescribeTemplatesResponse
 */
async function describeTemplates(request: DescribeTemplatesRequest): DescribeTemplatesResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return describeTemplatesWithOptions(request, headers, runtime);
}

model DescribeTriggerRequest {
  name?: string(name='Name', description='The application name.

This parameter is required.', example='web-server'),
  namespace?: string(name='Namespace', description='The namespace to which the application belongs.

This parameter is required.', example='default'),
  type?: string(name='Type', description='The type of trigger. Valid values:

*   `deployment`: performs actions on Deployments.
*   `application`: performs actions on applications that are deployed in Application Center.

Default value: `deployment`.

If you do not set this parameter, triggers are not filtered by type.', example='deployment'),
  action?: string(name='action', description='The action that the trigger performs. Set the value to redeploy.

`redeploy`: redeploys the resources specified by `project_id`.

If you do not specify this parameter, triggers are not filtered by action.', example='redeploy'),
}

model DescribeTriggerResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: [ 
    {
      id?: string(name='id', description='The ID of the trigger.', example='1234'),
      name?: string(name='name', description='The name of the trigger.', example='test'),
      clusterId?: string(name='cluster_id', description='The ID of the associated cluster.', example='c259f563386444ebb8d7****'),
      projectId?: string(name='project_id', description='The name of the project.

The name consists of the namespace where the application is deployed and the name of the application. The format is `${namespace}/${name}`. Example: default/test-app.', example='default/test-app'),
      type?: string(name='type', description='The type of trigger.

Valid values:

*   `deployment`: performs actions on Deployments.
*   `application`: performs actions on applications that are deployed in Application Center.

Default value: `deployment`.', example='deployment'),
      action?: string(name='action', description='The action that the trigger performs. The value is set to redeploy.

`redeploy`: redeploys the resource specified by project_id.', example='redeploy'),
      token?: string(name='token', description='The token information.', example='eyJhbGci***'),
    }
  ](name='body'),
}

/**
 * @summary Queries triggers that match specific conditions.
 *
 * @param request DescribeTriggerRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeTriggerResponse
 */
async function describeTriggerWithOptions(clusterId: string, request: DescribeTriggerRequest, headers: map[string]string, runtime: Util.RuntimeOptions): DescribeTriggerResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.name)) {
    query['Name'] = request.name;
  }
  if (!Util.isUnset(request.namespace)) {
    query['Namespace'] = request.namespace;
  }
  if (!Util.isUnset(request.type)) {
    query['Type'] = request.type;
  }
  if (!Util.isUnset(request.action)) {
    query['action'] = request.action;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeTrigger',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/clusters/${OpenApiUtil.getEncodeParam(clusterId)}/triggers`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'array',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Queries triggers that match specific conditions.
 *
 * @param request DescribeTriggerRequest
 * @return DescribeTriggerResponse
 */
async function describeTrigger(clusterId: string, request: DescribeTriggerRequest): DescribeTriggerResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return describeTriggerWithOptions(clusterId, request, headers, runtime);
}

model DescribeUserClusterNamespacesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: [ string ](name='body'),
}

/**
 * @summary You can use Kubernetes namespaces to limit users from accessing resources in a Container Service for Kubernetes (ACK) cluster. Users that are granted Role-Based Access Control (RBAC) permissions only on one namespace cannot access resources in other namespaces. Queries the RBAC permissions that are granted to the current Resource Access Management (RAM) user or RAM role on an ACK cluster.
 *
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeUserClusterNamespacesResponse
 */
async function describeUserClusterNamespacesWithOptions(ClusterId: string, headers: map[string]string, runtime: Util.RuntimeOptions): DescribeUserClusterNamespacesResponse {
  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
  };
  var params = new OpenApi.Params{
    action = 'DescribeUserClusterNamespaces',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/api/v2/k8s/${OpenApiUtil.getEncodeParam(ClusterId)}/namespaces`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'array',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary You can use Kubernetes namespaces to limit users from accessing resources in a Container Service for Kubernetes (ACK) cluster. Users that are granted Role-Based Access Control (RBAC) permissions only on one namespace cannot access resources in other namespaces. Queries the RBAC permissions that are granted to the current Resource Access Management (RAM) user or RAM role on an ACK cluster.
 *
 * @return DescribeUserClusterNamespacesResponse
 */
async function describeUserClusterNamespaces(ClusterId: string): DescribeUserClusterNamespacesResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return describeUserClusterNamespacesWithOptions(ClusterId, headers, runtime);
}

model DescribeUserPermissionResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: [ 
    {
      resourceId?: string(name='resource_id', description='The authorization setting. Valid values:

*   `{cluster_id}` is returned if the permissions are scoped to a cluster.
*   `{cluster_id}/{namespace}` is returned if the permissions are scoped to a namespace of a cluster.
*   `all-clusters` is returned if the permissions are scoped to all clusters.', example='c1b542****'),
      resourceType?: string(name='resource_type', description='The authorization type. Valid values:

*   `cluster`: indicates that the permissions are scoped to a cluster.
*   `namespace`: indicates that the permissions are scoped to a namespace of a cluster.
*   `console`: indicates that the permissions are scoped to all clusters. This value was displayed only in the console.', example='cluster'),
      roleName?: string(name='role_name', description='The name of the custom role. If a custom role is assigned, the value is the name of the assigned custom role.', example='view'),
      roleType?: string(name='role_type', description='The type of predefined role. Valid values:

*   `admin`: administrator
*   `ops`: O\\\\&M engineer
*   `dev`: developer
*   `restricted`: restricted user
*   `custom`: custom role', example='admin'),
      isOwner?: long(name='is_owner', description='Indicates whether the permissions are granted to the cluster owner.

*   `0`: indicates that the permissions are not granted to the cluster owner.
*   `1`: indicates that the permissions are granted to the cluster owner. The cluster owner is the administrator.', example='1'),
      isRamRole?: long(name='is_ram_role', description='Indicates whether the permissions are granted to the RAM role. Valid values:

*   `0`: indicates that the permissions are not granted to the RAM role.
*   `1`: indicates that the permissions are granted to the RAM role.', example='1'),
    }
  ](name='body'),
}

/**
 * @summary In an Container Service for Kubernetes (ACK) cluster, you can create and specify different Resource Access Management (RAM) users or roles to have different access permissions. This ensures access control and resource isolation. You can call the DescribeUserPermission operation to query the permissions that are granted to a RAM user or RAM role on ACK clusters, including the resources that are allowed to access, the scope of the permissions, the predefined role, and the permission source.
 *
 * @description **Precautions**:
 * *   If you call this operation as a Resource Access Management (RAM) user or by assuming a RAM role, only the permissions granted on the clusters on which the current account has the role-based access control (RBAC) administrator permissions are returned. If you want to query the permissions on all clusters, you must use an account that has the RBAC administrator permissions on all clusters.
 *
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeUserPermissionResponse
 */
async function describeUserPermissionWithOptions(uid: string, headers: map[string]string, runtime: Util.RuntimeOptions): DescribeUserPermissionResponse {
  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
  };
  var params = new OpenApi.Params{
    action = 'DescribeUserPermission',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/permissions/users/${OpenApiUtil.getEncodeParam(uid)}`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'array',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary In an Container Service for Kubernetes (ACK) cluster, you can create and specify different Resource Access Management (RAM) users or roles to have different access permissions. This ensures access control and resource isolation. You can call the DescribeUserPermission operation to query the permissions that are granted to a RAM user or RAM role on ACK clusters, including the resources that are allowed to access, the scope of the permissions, the predefined role, and the permission source.
 *
 * @description **Precautions**:
 * *   If you call this operation as a Resource Access Management (RAM) user or by assuming a RAM role, only the permissions granted on the clusters on which the current account has the role-based access control (RBAC) administrator permissions are returned. If you want to query the permissions on all clusters, you must use an account that has the RBAC administrator permissions on all clusters.
 *
 * @return DescribeUserPermissionResponse
 */
async function describeUserPermission(uid: string): DescribeUserPermissionResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return describeUserPermissionWithOptions(uid, headers, runtime);
}

model DescribeUserQuotaResponseBody = {
  amkClusterQuota?: long(name='amk_cluster_quota', description='The quota of Container Service for Kubernetes (ACK) managed clusters. Default value: 20. If the default quota limit is reached, submit an application in the [Quota Center console](https://quotas.console.aliyun.com/products/csk/quotas) to increase the quota.', example='20'),
  askClusterQuota?: long(name='ask_cluster_quota', description='The quota of ACK Serverless clusters. Default value: 20. If the default quota limit is reached, submit an application in the [Quota Center console](https://quotas.console.aliyun.com/products/csk/quotas) to increase the quota.', example='3'),
  clusterNodepoolQuota?: long(name='cluster_nodepool_quota', description='The quota of node pools in an ACK cluster. Default value: 20. If the default quota limit is reached, submit an application in the [Quota Center console](https://quotas.console.aliyun.com/products/csk/quotas) to increase the quota.', example='10'),
  clusterQuota?: long(name='cluster_quota', description='The quota of clusters that belong to an Alibaba Cloud account. Default value: 50. If the default quota limit is reached, submit an application in the [Quota Center console](https://quotas.console.aliyun.com/products/csk/quotas) to increase the quota.', example='50'),
  edgeImprovedNodepoolQuota?: {
    bandwidth?: int32(name='bandwidth', description='This parameter is discontinued.

The maximum bandwidth of each enhanced edge node pool. Unit: Mbit/s.', example='10'),
    count?: int32(name='count', description='This parameter is discontinued.

The maximum number of enhanced edge node pools that you can create within an Alibaba Cloud account.', example='3'),
    period?: int32(name='period', description='This parameter is discontinued.

The maximum subscription duration of an enhanced edge node pool. Unit: months.

>  You are charged for enhanced edge node pools based on the pay-as-you-go billing method. Therefore, you can ignore this parameter.', example='3'),
  }(name='edge_improved_nodepool_quota', description='This parameter is discontinued.

The quotas of enhanced edge node pools.'),
  nodeQuota?: long(name='node_quota', description='The quota of nodes in an ACK cluster. Default value: 100. If the default quota limit is reached, submit an application in the [Quota Center console](https://quotas.console.aliyun.com/products/csk/quotas) to increase the quota.', example='100'),
  quotas?: map[string]QuotasValue(name='quotas', description='Information about the new quota.'),
}

model DescribeUserQuotaResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeUserQuotaResponseBody(name='body'),
}

/**
 * @summary Queries quotas related to Container Service for Kubernetes (ACK) clusters, node pools, and nodes. To increase a quota, submit an application in the Quota Center console.
 *
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeUserQuotaResponse
 */
async function describeUserQuotaWithOptions(headers: map[string]string, runtime: Util.RuntimeOptions): DescribeUserQuotaResponse {
  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
  };
  var params = new OpenApi.Params{
    action = 'DescribeUserQuota',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/quota`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Queries quotas related to Container Service for Kubernetes (ACK) clusters, node pools, and nodes. To increase a quota, submit an application in the Quota Center console.
 *
 * @return DescribeUserQuotaResponse
 */
async function describeUserQuota(): DescribeUserQuotaResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return describeUserQuotaWithOptions(headers, runtime);
}

model EdgeClusterAddEdgeMachineRequest {
  expired?: long(name='expired', description='The timeout period of sessions. Unit: seconds.', example='1024'),
  nodepoolId?: string(name='nodepool_id', description='The node pool ID.

This parameter is required.', example='c26607f52179f4472a0d9723e7595****'),
  options?: string(name='options', description='The options that you want to configure.', example='"{\\\\"enableIptables\\\\":true,\\\\"quiet\\\\":true,\\\\"manageRuntime\\\\":true,\\\\"allowedClusterAddons\\\\":[\\\\"kube-proxy\\\\",\\\\"flannel\\\\",\\\\"coredns\\\\"]}"'),
}

model EdgeClusterAddEdgeMachineResponseBody = {
  edgeMachineId?: string(name='edge_machine_id', description='The ID of the cloud-native box.', example='0f4bf70a-caff-4b26-a679-fb0188a1****'),
  requestId?: string(name='request_id', description='The request ID.', example='0adf3a23-6841-41e8-9f55-7b290216c980'),
}

model EdgeClusterAddEdgeMachineResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: EdgeClusterAddEdgeMachineResponseBody(name='body'),
}

/**
 * @deprecated OpenAPI EdgeClusterAddEdgeMachine is deprecated
 *
 * @summary You can call the EdgeClusterAddEdgeMachine operation to add a cloud-native box to a Container Service for Kubernetes (ACK) Edge cluster.
 *
 * @param request EdgeClusterAddEdgeMachineRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return EdgeClusterAddEdgeMachineResponse
 */
// Deprecated
async function edgeClusterAddEdgeMachineWithOptions(clusterid: string, edgeMachineid: string, request: EdgeClusterAddEdgeMachineRequest, headers: map[string]string, runtime: Util.RuntimeOptions): EdgeClusterAddEdgeMachineResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.expired)) {
    body['expired'] = request.expired;
  }
  if (!Util.isUnset(request.nodepoolId)) {
    body['nodepool_id'] = request.nodepoolId;
  }
  if (!Util.isUnset(request.options)) {
    body['options'] = request.options;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'EdgeClusterAddEdgeMachine',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/clusters/%5Bclusterid%5D/attachedgemachine/%5Bedge_machineid%5D`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @deprecated OpenAPI EdgeClusterAddEdgeMachine is deprecated
 *
 * @summary You can call the EdgeClusterAddEdgeMachine operation to add a cloud-native box to a Container Service for Kubernetes (ACK) Edge cluster.
 *
 * @param request EdgeClusterAddEdgeMachineRequest
 * @return EdgeClusterAddEdgeMachineResponse
 */
// Deprecated
async function edgeClusterAddEdgeMachine(clusterid: string, edgeMachineid: string, request: EdgeClusterAddEdgeMachineRequest): EdgeClusterAddEdgeMachineResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return edgeClusterAddEdgeMachineWithOptions(clusterid, edgeMachineid, request, headers, runtime);
}

model FixNodePoolVulsRequest {
  autoRestart?: boolean(name='auto_restart', description='Specifies whether to allow the nodes to restart.', example='true'),
  nodes?: [ string ](name='nodes', description='The names of the nodes to be patched.'),
  rolloutPolicy?: {
    maxParallelism?: long(name='max_parallelism', description='The maximum concurrency for batch patching. Minimum value: 1. The maximum value equals the number of nodes in the node pool.', example='1'),
  }(name='rollout_policy', description='The batch patching policy.'),
  vuls?: [ string ](name='vuls', description='The list of vulnerabilities.'),
}

model FixNodePoolVulsResponseBody = {
  taskId?: string(name='task_id', description='The ID of the CVE patching task.', example='T-60fea8ad2e277f087900****'),
}

model FixNodePoolVulsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: FixNodePoolVulsResponseBody(name='body'),
}

/**
 * @summary Patches node vulnerabilities in a node pool to enhance node security. Cloud Security provided by Alibaba Cloud periodically scans Elastic Compute Service (ECS) instances for vulnerabilities and provides suggestions on how to patch the detected vulnerabilities. Vulnerability patching may require node restarts. Make sure that your cluster has sufficient idle nodes for node draining.
 *
 * @description 1.  The Common Vulnerabilities and Exposures (CVE) patching feature is developed based on Security Center. To use this feature, you must purchase the Security Center Ultimate Edition that supports Container Service for Kubernetes (ACK).
 * 2.  ACK may need to restart nodes to patch certain vulnerabilities. ACK drains a node before the node restarts. Make sure that the ACK cluster has sufficient idle nodes to host the pods evicted from the trained nodes. For example, you can scale out a node pool before you patch vulnerabilities for the nodes in the node pool.
 * 3.  Security Center ensures the compatibility of CVE patches. We recommend that you check the compatibility of a CVE patch with your application before you install the patch. You can pause or cancel a CVE patching task anytime.
 * 4.  CVE patching is a progressive task that consists of multiple batches. After you pause or cancel a CVE patching task, ACK continues to process the dispatched batches. Only the batches that have not been dispatched are paused or canceled.
 *
 * @param request FixNodePoolVulsRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return FixNodePoolVulsResponse
 */
async function fixNodePoolVulsWithOptions(clusterId: string, nodepoolId: string, request: FixNodePoolVulsRequest, headers: map[string]string, runtime: Util.RuntimeOptions): FixNodePoolVulsResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.autoRestart)) {
    body['auto_restart'] = request.autoRestart;
  }
  if (!Util.isUnset(request.nodes)) {
    body['nodes'] = request.nodes;
  }
  if (!Util.isUnset(request.rolloutPolicy)) {
    body['rollout_policy'] = request.rolloutPolicy;
  }
  if (!Util.isUnset(request.vuls)) {
    body['vuls'] = request.vuls;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'FixNodePoolVuls',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/clusters/${OpenApiUtil.getEncodeParam(clusterId)}/nodepools/${OpenApiUtil.getEncodeParam(nodepoolId)}/vuls/fix`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Patches node vulnerabilities in a node pool to enhance node security. Cloud Security provided by Alibaba Cloud periodically scans Elastic Compute Service (ECS) instances for vulnerabilities and provides suggestions on how to patch the detected vulnerabilities. Vulnerability patching may require node restarts. Make sure that your cluster has sufficient idle nodes for node draining.
 *
 * @description 1.  The Common Vulnerabilities and Exposures (CVE) patching feature is developed based on Security Center. To use this feature, you must purchase the Security Center Ultimate Edition that supports Container Service for Kubernetes (ACK).
 * 2.  ACK may need to restart nodes to patch certain vulnerabilities. ACK drains a node before the node restarts. Make sure that the ACK cluster has sufficient idle nodes to host the pods evicted from the trained nodes. For example, you can scale out a node pool before you patch vulnerabilities for the nodes in the node pool.
 * 3.  Security Center ensures the compatibility of CVE patches. We recommend that you check the compatibility of a CVE patch with your application before you install the patch. You can pause or cancel a CVE patching task anytime.
 * 4.  CVE patching is a progressive task that consists of multiple batches. After you pause or cancel a CVE patching task, ACK continues to process the dispatched batches. Only the batches that have not been dispatched are paused or canceled.
 *
 * @param request FixNodePoolVulsRequest
 * @return FixNodePoolVulsResponse
 */
async function fixNodePoolVuls(clusterId: string, nodepoolId: string, request: FixNodePoolVulsRequest): FixNodePoolVulsResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return fixNodePoolVulsWithOptions(clusterId, nodepoolId, request, headers, runtime);
}

model GetClusterAddonInstanceResponseBody = {
  config?: string(name='config', description='The custom configurations of the component.', example='{"sls_project_name":""}'),
  logging?: {
    capable?: boolean(name='capable', description='Indicates whether Simple Log Service is supported by the component.', example='false'),
    enabled?: boolean(name='enabled', description='Indicates whether Simple Log Service is enabled for the component.', example='false'),
    logProject?: string(name='log_project', description='The Simple Log Service project that is used to collect logs for the component.', example='my-log-project'),
    logstore?: string(name='logstore', description='The Simple Log Service Logstore that is used to collect logs for the component.', example='my-logstore'),
  }(name='logging', description='The status of Simple Log Service.'),
  name?: string(name='name', description='The name of the component instance.', example='ack-node-problem-detector'),
  state?: string(name='state', description='The status of the component. Valid values:

*   active: The component is installed.
*   updating: The component is being modified.
*   upgrading: The component is being updated.
*   deleting: The component is being uninstalled.', example='active'),
  version?: string(name='version', description='The version of the component instance.', example='1.2.16'),
}

model GetClusterAddonInstanceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetClusterAddonInstanceResponseBody(name='body'),
}

/**
 * @summary You can call the GetClusterAddonInstance operation to query the information of a component instance in a cluster, including the version, configurations, and log status of the component instance.
 *
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetClusterAddonInstanceResponse
 */
async function getClusterAddonInstanceWithOptions(clusterId: string, instanceName: string, headers: map[string]string, runtime: Util.RuntimeOptions): GetClusterAddonInstanceResponse {
  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
  };
  var params = new OpenApi.Params{
    action = 'GetClusterAddonInstance',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/clusters/${OpenApiUtil.getEncodeParam(clusterId)}/addon_instances/${OpenApiUtil.getEncodeParam(instanceName)}`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary You can call the GetClusterAddonInstance operation to query the information of a component instance in a cluster, including the version, configurations, and log status of the component instance.
 *
 * @return GetClusterAddonInstanceResponse
 */
async function getClusterAddonInstance(clusterId: string, instanceName: string): GetClusterAddonInstanceResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return getClusterAddonInstanceWithOptions(clusterId, instanceName, headers, runtime);
}

model GetClusterAuditProjectResponseBody = {
  auditEnabled?: boolean(name='audit_enabled', description='Indicates whether the cluster auditing feature is enabled for the cluster. 

* `true`: The cluster auditing feature is enabled for the cluster. 
* `false`: The cluster auditing feature is disabled for the cluster.', example='true'),
  slsProjectName?: string(name='sls_project_name', description='The SLS project in which the audit logs of the API server are stored.', example='k8s-log-cad1230511cbb4db4a488e58518******'),
}

model GetClusterAuditProjectResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetClusterAuditProjectResponseBody(name='body'),
}

/**
 * @summary You can call the GetClusterAuditProject operation to check whether the cluster has API Server auditing enabled and the corresponding Simple Log Service project that stores API Server audit logs.
 *
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetClusterAuditProjectResponse
 */
async function getClusterAuditProjectWithOptions(clusterid: string, headers: map[string]string, runtime: Util.RuntimeOptions): GetClusterAuditProjectResponse {
  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
  };
  var params = new OpenApi.Params{
    action = 'GetClusterAuditProject',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/clusters/${OpenApiUtil.getEncodeParam(clusterid)}/audit`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary You can call the GetClusterAuditProject operation to check whether the cluster has API Server auditing enabled and the corresponding Simple Log Service project that stores API Server audit logs.
 *
 * @return GetClusterAuditProjectResponse
 */
async function getClusterAuditProject(clusterid: string): GetClusterAuditProjectResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return getClusterAuditProjectWithOptions(clusterid, headers, runtime);
}

model GetClusterCheckResponseBody = {
  checkId?: string(name='check_id', description='The ID of the cluster check task.', example='1697100584236600453-ce0da5a1d627e4e9e9f96cae8ad07****-clustercheck-lboto'),
  checkItems?: map[string][  map[string]any ](name='check_items', description='The list of check items.'),
  createdAt?: string(name='created_at', description='The time when the cluster check task was created.', example='2023-10-16T08:31:20.292030178Z'),
  finishedAt?: string(name='finished_at', description='The time when the cluster check task was completed.', example='2023-10-16T08:35:20.292030178Z'),
  message?: string(name='message', description='The message that indicates the status of the cluster check task.', example='task succeed'),
  status?: string(name='status', description='The status of the cluster check.', example='Succeeded'),
  type?: string(name='type', description='The check method.', example='ClusterUpgrade'),
}

model GetClusterCheckResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetClusterCheckResponseBody(name='body'),
}

/**
 * @summary Queries a cluster check task by cluster ID and task ID. You can view the status, check items, creation time, and end time of the task. Container Intelligence Service (CIS) provides a variety of Kubernetes cluster check features, including cluster update check, cluster migration check, component installation check, component update check, and node pool check.
 *
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetClusterCheckResponse
 */
async function getClusterCheckWithOptions(clusterId: string, checkId: string, headers: map[string]string, runtime: Util.RuntimeOptions): GetClusterCheckResponse {
  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
  };
  var params = new OpenApi.Params{
    action = 'GetClusterCheck',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/clusters/${OpenApiUtil.getEncodeParam(clusterId)}/checks/${OpenApiUtil.getEncodeParam(checkId)}`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Queries a cluster check task by cluster ID and task ID. You can view the status, check items, creation time, and end time of the task. Container Intelligence Service (CIS) provides a variety of Kubernetes cluster check features, including cluster update check, cluster migration check, component installation check, component update check, and node pool check.
 *
 * @return GetClusterCheckResponse
 */
async function getClusterCheck(clusterId: string, checkId: string): GetClusterCheckResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return getClusterCheckWithOptions(clusterId, checkId, headers, runtime);
}

model GetClusterDiagnosisCheckItemsRequest {
  language?: string(name='language', description='The query language.', example='zh_CN'),
}

model GetClusterDiagnosisCheckItemsResponseBody = {
  checkItems?: [ 
    {
      desc?: string(name='desc', description='The description.', example='Check whether the node can access host dns service'),
      display?: string(name='display', description='The display name.', example='HostDNS'),
      group?: string(name='group', description='The name of the group to which the check item belongs.', example='Node'),
      level?: string(name='level', description='The severity level of the check result.

Valid values:

*   normal
*   warning
*   error', example='normal'),
      message?: string(name='message', description='The check result.', example='success'),
      name?: string(name='name', description='The name of the check item.', example='HostDNS'),
      refer?: string(name='refer', description='The reference value.', example='True'),
      value?: string(name='value', description='The value of the check item.', example='True'),
    }
  ](name='check_items', description='The check item.'),
  code?: string(name='code', description='The status code.', example='success'),
  isSuccess?: boolean(name='is_success', description='Indicates whether the check is successful.', example='true'),
  requestId?: string(name='request_id', description='The request ID.', example='1DFFD8C6-259E-582B-8B40-002C17DC****'),
}

model GetClusterDiagnosisCheckItemsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetClusterDiagnosisCheckItemsResponseBody(name='body'),
}

/**
 * @summary Queries cluster diagnostic items.
 *
 * @param request GetClusterDiagnosisCheckItemsRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetClusterDiagnosisCheckItemsResponse
 */
async function getClusterDiagnosisCheckItemsWithOptions(clusterId: string, diagnosisId: string, request: GetClusterDiagnosisCheckItemsRequest, headers: map[string]string, runtime: Util.RuntimeOptions): GetClusterDiagnosisCheckItemsResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.language)) {
    query['language'] = request.language;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetClusterDiagnosisCheckItems',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/clusters/${OpenApiUtil.getEncodeParam(clusterId)}/diagnosis/${OpenApiUtil.getEncodeParam(diagnosisId)}/check_items`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Queries cluster diagnostic items.
 *
 * @param request GetClusterDiagnosisCheckItemsRequest
 * @return GetClusterDiagnosisCheckItemsResponse
 */
async function getClusterDiagnosisCheckItems(clusterId: string, diagnosisId: string, request: GetClusterDiagnosisCheckItemsRequest): GetClusterDiagnosisCheckItemsResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return getClusterDiagnosisCheckItemsWithOptions(clusterId, diagnosisId, request, headers, runtime);
}

model GetClusterDiagnosisResultRequest {
  language?: string(name='language', description='The query language.', example='zh_CN'),
}

model GetClusterDiagnosisResultResponseBody = {
  code?: long(name='code', description='The code that indicates the diagnostic result. Valid values:

*   0: the diagnostic is completed.
*   1: the diagnostic failed.', example='0'),
  created?: string(name='created', description='The time when the diagnostic is initiated.', example='2024-05-28T11:29Z'),
  diagnosisId?: string(name='diagnosis_id', description='The diagnostic ID.', example='6cf6b62e334e4583bdfd26707516****'),
  finished?: string(name='finished', description='The time when the diagnostic is completed.', example='2024-05-28T11:29Z'),
  message?: string(name='message', description='The diagnostic status information.', example='success'),
  result?: string(name='result', description='The diagnostic result.', example='{"phase":5,"version":"20240101"}'),
  status?: long(name='status', description='The status of the diagnostic. Valid values:

*   0: The diagnostic is created.
*   1: The diagnostic is running.
*   2: The diagnostic is completed.', example='2'),
  target?: string(name='target', description='The diagnostic object.', example='{"name":"cn-hongkong.10.0.0.246"}'),
  type?: string(name='type', description='The type of the diagnostic.

Valid values:

*   node
*   ingress
*   cluster
*   memory
*   pod
*   service
*   network', example='Node'),
}

model GetClusterDiagnosisResultResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetClusterDiagnosisResultResponseBody(name='body'),
}

/**
 * @summary Queries cluster diagnostic results.
 *
 * @param request GetClusterDiagnosisResultRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetClusterDiagnosisResultResponse
 */
async function getClusterDiagnosisResultWithOptions(clusterId: string, diagnosisId: string, request: GetClusterDiagnosisResultRequest, headers: map[string]string, runtime: Util.RuntimeOptions): GetClusterDiagnosisResultResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.language)) {
    query['language'] = request.language;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetClusterDiagnosisResult',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/clusters/${OpenApiUtil.getEncodeParam(clusterId)}/diagnosis/${OpenApiUtil.getEncodeParam(diagnosisId)}/result`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Queries cluster diagnostic results.
 *
 * @param request GetClusterDiagnosisResultRequest
 * @return GetClusterDiagnosisResultResponse
 */
async function getClusterDiagnosisResult(clusterId: string, diagnosisId: string, request: GetClusterDiagnosisResultRequest): GetClusterDiagnosisResultResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return getClusterDiagnosisResultWithOptions(clusterId, diagnosisId, request, headers, runtime);
}

model GetKubernetesTriggerRequest {
  name?: string(name='Name', description='The application name.

This parameter is required.', example='web-server'),
  namespace?: string(name='Namespace', description='The namespace name.

This parameter is required.', example='default'),
  type?: string(name='Type', description='The type of trigger. Valid values:

*   `deployment`: performs actions on Deployments.
*   `application`: performs actions on applications that are deployed in Application Center.

Default value: `deployment`.

If you do not set this parameter, triggers are not filtered by type.', example='deployment'),
  action?: string(name='action', description='The action that the trigger performs. Set the value to redeploy.

`redeploy`: redeploys the resources specified by `project_id`.

If you do not specify this parameter, triggers are not filtered by action.', example='redeploy'),
}

model GetKubernetesTriggerResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: [ 
    {
      id?: string(name='id', description='The ID of the trigger.', example='1234'),
      name?: string(name='name', description='The name of the trigger.', example='test'),
      clusterId?: string(name='cluster_id', description='The ID of the associated cluster.', example='c259f563386444ebb8d7**'),
      projectId?: string(name='project_id', description='The name of the project.

The name consists of the namespace where the application is deployed and the name of the application. The format is `${namespace}/${name}`. Example: default/test-app.', example='default/test-app'),
      type?: string(name='type', description='The type of trigger.

Valid values:

*   `deployment`: performs actions on Deployments.
*   `application`: performs actions on applications that are deployed in Application Center.

Default value: `deployment`.', example='deployment'),
      action?: string(name='action', description='The action that the trigger performs. The value is set to redeploy.

`redeploy`: redeploys the resource specified by project_id.', example='redeploy'),
      token?: string(name='token', description='Token', example='eyJhbGci***'),
    }
  ](name='body'),
}

/**
 * @deprecated OpenAPI GetKubernetesTrigger is deprecated
 *
 * @summary You can call the GetKubernetesTrigger operationto query the triggers of an application by application name.
 *
 * @param request GetKubernetesTriggerRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetKubernetesTriggerResponse
 */
// Deprecated
async function getKubernetesTriggerWithOptions(ClusterId: string, request: GetKubernetesTriggerRequest, headers: map[string]string, runtime: Util.RuntimeOptions): GetKubernetesTriggerResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.name)) {
    query['Name'] = request.name;
  }
  if (!Util.isUnset(request.namespace)) {
    query['Namespace'] = request.namespace;
  }
  if (!Util.isUnset(request.type)) {
    query['Type'] = request.type;
  }
  if (!Util.isUnset(request.action)) {
    query['action'] = request.action;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetKubernetesTrigger',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/triggers/${OpenApiUtil.getEncodeParam(ClusterId)}`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'array',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @deprecated OpenAPI GetKubernetesTrigger is deprecated
 *
 * @summary You can call the GetKubernetesTrigger operationto query the triggers of an application by application name.
 *
 * @param request GetKubernetesTriggerRequest
 * @return GetKubernetesTriggerResponse
 */
// Deprecated
async function getKubernetesTrigger(ClusterId: string, request: GetKubernetesTriggerRequest): GetKubernetesTriggerResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return getKubernetesTriggerWithOptions(ClusterId, request, headers, runtime);
}

model GetUpgradeStatusResponseBody = {
  errorMessage?: string(name='error_message', description='The error message returned during the update.', example='subject to actual return'),
  precheckReportId?: string(name='precheck_report_id', description='The ID of the precheck report.', example='be4c8eb72de94d459ea7ace7c811d119'),
  status?: string(name='status', description='The status of the update. Valid values:

*   `success`: The update is successful.
*   `fail`: The update failed.
*   `pause`: The update is paused.
*   `running`: The update is in progress.', example='running'),
  upgradeStep?: string(name='upgrade_step', description='The current phase of the update. Valid values:

*   `not_start`: The update is not started.
*   `prechecking`: The precheck is in progress.
*   `upgrading`: The cluster is being updated.
*   `pause`: The update is paused.
*   `success`: The update is successful.', example='prechecking'),
  upgradeTask?: {
    message?: string(name='message', description='The description of the update task.', example='subject to actual return'),
    status?: string(name='status', description='The status of the update task. Valid values:

*   `running`: The update task is being executed.
*   `Success`: The update task is successfully executed.
*   `Failed`: The update task failed.', example='running'),
  }(name='upgrade_task', description='The details of the update task.'),
}

model GetUpgradeStatusResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetUpgradeStatusResponseBody(name='body'),
}

/**
 * @deprecated OpenAPI GetUpgradeStatus is deprecated
 *
 * @summary You can call the GetUpgradeStatus operation to query the update progress of a cluster by cluster ID.
 *
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetUpgradeStatusResponse
 */
// Deprecated
async function getUpgradeStatusWithOptions(ClusterId: string, headers: map[string]string, runtime: Util.RuntimeOptions): GetUpgradeStatusResponse {
  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
  };
  var params = new OpenApi.Params{
    action = 'GetUpgradeStatus',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/api/v2/clusters/${OpenApiUtil.getEncodeParam(ClusterId)}/upgrade/status`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @deprecated OpenAPI GetUpgradeStatus is deprecated
 *
 * @summary You can call the GetUpgradeStatus operation to query the update progress of a cluster by cluster ID.
 *
 * @return GetUpgradeStatusResponse
 */
// Deprecated
async function getUpgradeStatus(ClusterId: string): GetUpgradeStatusResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return getUpgradeStatusWithOptions(ClusterId, headers, runtime);
}

model GrantPermissionsRequest {
  body?: [ 
    {
      cluster?: string(name='cluster', description='The ID of the cluster on which you want to grant permissions to the RAM role or RAM role.

*   Set this parameter to an empty string if `role_type` is set to `all-clusters`.

This parameter is required.', example='c796c60***'),
      isCustom?: boolean(name='is_custom', description='Specifies whether to assign a custom role to the RAM user or RAM role. If you want to assign a custom role to the RAM user or RAM role, set `role_name` to the name of the custom role.', example='false'),
      isRamRole?: boolean(name='is_ram_role', description='Specifies whether to use a RAM role to grant permissions.', example='false'),
      namespace?: string(name='namespace', description='The namespace that you want to authorize the RAM user or RAM role to manage. This parameter is required only if you set role_type to namespace.', example='test'),
      roleName?: string(name='role_name', description='The predefined role name. Valid values:

*   `admin`: administrator
*   `admin-view`: read-only administrator
*   `ops`: O\\\\&M engineer
*   `dev`: developer
*   `restricted`: restricted user
*   Custom role

Note:

*   You cannot grant namespace-level permissions to the `admin`, `admin-view`, and `ops` roles.
*   You cannot grant all cluster-level permissions to the `admin-view` role.

This parameter is required.', example='ops'),
      roleType?: string(name='role_type', description='The authorization type. Valid values:

*   `cluster`: authorizes the RAM user or RAM role to manage the specified clusters.
*   `namespace`: authorizes the RAM user or RAM role to manage the specified namespaces.
*   `all-clusters`: authorizes the RAM user or RAM role to manage all clusters.

This parameter is required.', example='cluster'),
    }
  ](name='body', description='The request body.'),
}

model GrantPermissionsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
}

/**
 * @summary Updates the role-based access control (RBAC) permissions of a Resource Access Management (RAM) user or RAM role. By default, you do not have the RBAC permissions on a Container Service for Kubernetes (ACK) cluster if you are not the cluster owner or you are not using an Alibaba Cloud account. You can call this operation to specify the resources that can be accessed, permission scope, and predefined roles. This helps you better manage the access control on resources in ACK clusters.
 *
 * @description **Precautions**:
 * *   If you use a Resource Access Management (RAM) user to call the operation, make sure that the RAM user has the permissions to modify the permissions of other RAM users or RAM roles. Otherwise, the `StatusForbidden` or `ForbiddenGrantPermissions` error code is returned after you call the operation. For more information, see [Use a RAM user to grant RBAC permissions to other RAM users](https://help.aliyun.com/document_detail/119035.html).
 * *   If you update full permissions, the existing permissions of the RAM user or RAM role on the cluster are overwritten. You must specify all the permissions that you want to grant to the RAM user or RAM role in the request parameters when you call the operation.
 *
 * @param request GrantPermissionsRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return GrantPermissionsResponse
 */
async function grantPermissionsWithOptions(uid: string, request: GrantPermissionsRequest, headers: map[string]string, runtime: Util.RuntimeOptions): GrantPermissionsResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = Util.toArray(request.body),
  };
  var params = new OpenApi.Params{
    action = 'GrantPermissions',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/permissions/users/${OpenApiUtil.getEncodeParam(uid)}`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'none',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Updates the role-based access control (RBAC) permissions of a Resource Access Management (RAM) user or RAM role. By default, you do not have the RBAC permissions on a Container Service for Kubernetes (ACK) cluster if you are not the cluster owner or you are not using an Alibaba Cloud account. You can call this operation to specify the resources that can be accessed, permission scope, and predefined roles. This helps you better manage the access control on resources in ACK clusters.
 *
 * @description **Precautions**:
 * *   If you use a Resource Access Management (RAM) user to call the operation, make sure that the RAM user has the permissions to modify the permissions of other RAM users or RAM roles. Otherwise, the `StatusForbidden` or `ForbiddenGrantPermissions` error code is returned after you call the operation. For more information, see [Use a RAM user to grant RBAC permissions to other RAM users](https://help.aliyun.com/document_detail/119035.html).
 * *   If you update full permissions, the existing permissions of the RAM user or RAM role on the cluster are overwritten. You must specify all the permissions that you want to grant to the RAM user or RAM role in the request parameters when you call the operation.
 *
 * @param request GrantPermissionsRequest
 * @return GrantPermissionsResponse
 */
async function grantPermissions(uid: string, request: GrantPermissionsRequest): GrantPermissionsResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return grantPermissionsWithOptions(uid, request, headers, runtime);
}

model InstallClusterAddonsRequest {
  body?: [ 
    {
      config?: string(name='config', description='The custom component settings that you want to use. The value is a JSON string.', example='{\\\\"IngressDashboardEnabled\\\\":\\\\"true\\\\",\\\\"sls_project_name\\\\":\\\\"your_sls_project_name\\\\"}"}'),
      name?: string(name='name', description='The component name.

This parameter is required.', example='ags-metrics-collector'),
      version?: string(name='version', description='The component version.

>  You can call the [DescribeClusterAddonsVersion](https://help.aliyun.com/document_detail/197434.html) operation to query the version of a component.

This parameter is required.', example='v1.0.0.2-cc3b2d6-aliyun'),
    }
  ](name='body', description='The request body.', example='ags-metrics-collector'),
}

model InstallClusterAddonsResponseBody = {
  clusterId?: string(name='cluster_id', description='The cluster ID.', example='c82e6987e2961451182edacd74faf****'),
  requestId?: string(name='request_id', description='The request ID.', example='48BD70F6-A7E6-543D-9F23-08DEB764C92E'),
  taskId?: string(name='task_id', description='The task ID.', example='T-5a54309c80282e39ea00002f'),
}

model InstallClusterAddonsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: InstallClusterAddonsResponseBody(name='body'),
}

/**
 * @summary Installs a component by specifying the name and version of the component. To enhance Kubernetes capabilities, you can install a variety of components in Container Service for Kubernetes (ACK) clusters, such as fully-managed core components and application, logging and monitoring, network, storage, and security group components.
 *
 * @param request InstallClusterAddonsRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return InstallClusterAddonsResponse
 */
async function installClusterAddonsWithOptions(ClusterId: string, request: InstallClusterAddonsRequest, headers: map[string]string, runtime: Util.RuntimeOptions): InstallClusterAddonsResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = Util.toArray(request.body),
  };
  var params = new OpenApi.Params{
    action = 'InstallClusterAddons',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/clusters/${OpenApiUtil.getEncodeParam(ClusterId)}/components/install`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Installs a component by specifying the name and version of the component. To enhance Kubernetes capabilities, you can install a variety of components in Container Service for Kubernetes (ACK) clusters, such as fully-managed core components and application, logging and monitoring, network, storage, and security group components.
 *
 * @param request InstallClusterAddonsRequest
 * @return InstallClusterAddonsResponse
 */
async function installClusterAddons(ClusterId: string, request: InstallClusterAddonsRequest): InstallClusterAddonsResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return installClusterAddonsWithOptions(ClusterId, request, headers, runtime);
}

model ListAddonsRequest {
  clusterId?: string(name='cluster_id', description='The cluster ID. If you specify a cluster ID, only components used in the specified cluster are queried. Other parameters are ignored.', example='c02b3e03be10643e8a644a843ffcb****'),
  clusterSpec?: string(name='cluster_spec', description='The specifications of the cluster. If cluster_id is specified, this parameter is ignored. You must specify the region_id, cluster_type, profile, cluster_spec, and cluster_version parameters at the same time.', example='ack.pro.small'),
  clusterType?: string(name='cluster_type', description='The type of the cluster. If cluster_id is specified, this parameter is ignored. You must specify the region_id, cluster_type, profile, cluster_spec, and cluster_version parameters at the same time.', example='ManagedKubernetes'),
  clusterVersion?: string(name='cluster_version', description='The version of the cluster. If cluster_id is specified, this parameter is ignored. You must specify the region_id, cluster_type, profile, cluster_spec, and cluster_version parameters at the same time.', example='1.26.3-aliyun.1'),
  profile?: string(name='profile', description='The subtype of the cluster. If cluster_id is specified, this parameter is ignored. You must specify the region_id, cluster_type, profile, cluster_spec, and cluster_version parameters at the same time.', example='Default'),
  regionId?: string(name='region_id', description='The region of the cluster. If cluster_id is specified, this parameter is ignored. You must specify the region_id, cluster_type, profile, cluster_spec, and cluster_version parameters at the same time.', example='cn-hangzhou'),
}

model ListAddonsResponseBody = {
  addons?: [ 
    {
      architecture?: [ string ](name='architecture', description='Architectures supported by the component. Valid values:

*   amd64
*   arm64'),
      category?: string(name='category', description='The category of the component.', example='monitor'),
      configSchema?: string(name='config_schema', description='The schema of the custom parameters of the component.', example='{}'),
      installByDefault?: boolean(name='install_by_default', description='Indicates whether the component is automatically installed by default.', example='false'),
      managed?: boolean(name='managed', description='Indicates whether the component is fully managed.', example='false'),
      name?: string(name='name', description='The component name.', example='arms-prometheus'),
      supportedActions?: [ string ](name='supported_actions', description='Operations supported by the component. Valid values:

*   Install
*   Upgrade
*   Modify
*   Uninstall'),
      version?: string(name='version', description='The version number.', example='1.1.9'),
    }
  ](name='addons', description='The list of available components.'),
}

model ListAddonsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListAddonsResponseBody(name='body'),
}

/**
 * @summary Queries the available components based on specific conditions such as the region, cluster type, cluster subtype defined by cluster profile, and cluster version and queries the detailed information about a component. The information includes whether the component is managed, the supported custom parameter schema, and compatible operating system architecture.
 *
 * @param request ListAddonsRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListAddonsResponse
 */
async function listAddonsWithOptions(request: ListAddonsRequest, headers: map[string]string, runtime: Util.RuntimeOptions): ListAddonsResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.clusterId)) {
    query['cluster_id'] = request.clusterId;
  }
  if (!Util.isUnset(request.clusterSpec)) {
    query['cluster_spec'] = request.clusterSpec;
  }
  if (!Util.isUnset(request.clusterType)) {
    query['cluster_type'] = request.clusterType;
  }
  if (!Util.isUnset(request.clusterVersion)) {
    query['cluster_version'] = request.clusterVersion;
  }
  if (!Util.isUnset(request.profile)) {
    query['profile'] = request.profile;
  }
  if (!Util.isUnset(request.regionId)) {
    query['region_id'] = request.regionId;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListAddons',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/addons`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Queries the available components based on specific conditions such as the region, cluster type, cluster subtype defined by cluster profile, and cluster version and queries the detailed information about a component. The information includes whether the component is managed, the supported custom parameter schema, and compatible operating system architecture.
 *
 * @param request ListAddonsRequest
 * @return ListAddonsResponse
 */
async function listAddons(request: ListAddonsRequest): ListAddonsResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return listAddonsWithOptions(request, headers, runtime);
}

model ListClusterAddonInstancesResponseBody = {
  addons?: [ 
    {
      name?: string(name='name', description='The component name.', example='coredns'),
      state?: string(name='state', description='The status of the component. Valid values:

*   active: The component is installed.
*   updating: The component is being modified.
*   upgrading: The component is being updated.
*   deleting: The component is being uninstalled.', example='active'),
      version?: string(name='version', description='The version of the component.', example='v1.9.3.10-7dfca203-aliyun'),
    }
  ](name='addons', description='A list of components that are installed in the cluster.'),
}

model ListClusterAddonInstancesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListClusterAddonInstancesResponseBody(name='body'),
}

/**
 * @summary Queries the component instances that are running in the specified cluster and the information about the component instances. The information includes the component version and status.
 *
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListClusterAddonInstancesResponse
 */
async function listClusterAddonInstancesWithOptions(clusterId: string, headers: map[string]string, runtime: Util.RuntimeOptions): ListClusterAddonInstancesResponse {
  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
  };
  var params = new OpenApi.Params{
    action = 'ListClusterAddonInstances',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/clusters/${OpenApiUtil.getEncodeParam(clusterId)}/addon_instances`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Queries the component instances that are running in the specified cluster and the information about the component instances. The information includes the component version and status.
 *
 * @return ListClusterAddonInstancesResponse
 */
async function listClusterAddonInstances(clusterId: string): ListClusterAddonInstancesResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return listClusterAddonInstancesWithOptions(clusterId, headers, runtime);
}

model ListClusterChecksRequest {
  target?: string(name='target', description='The targets to check.', example='ngw-bp19ay6nnvd4cexxxx'),
  type?: string(name='type', description='The check method.', example='ClusterUpgrade'),
}

model ListClusterChecksResponseBody = {
  checks?: [ 
    {
      checkId?: string(name='check_id', description='The ID of the cluster check task.', example='1697100584236600453-ce0da5a1d627e4e9e9f96cae8ad07****-clustercheck-lboto'),
      createdAt?: string(name='created_at', description='The time when the cluster check task was created.', example='2023-10-16T08:31:20.292030178Z'),
      finishedAt?: string(name='finished_at', description='The time when the cluster check task was completed.', example='2023-10-16T08:35:20.292030178Z'),
      message?: string(name='message', description='The message that indicates the status of the cluster check task.', example='task succeed'),
      status?: string(name='status', description='The status of the cluster check.', example='Succeeded'),
      type?: string(name='type', description='The check method.', example='ClusterUpgrade'),
    }
  ](name='checks', description='The list of check items.'),
}

model ListClusterChecksResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListClusterChecksResponseBody(name='body'),
}

/**
 * @summary You can call the ListClusterChecks operation to query all the cluster check results of a cluster.
 *
 * @param request ListClusterChecksRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListClusterChecksResponse
 */
async function listClusterChecksWithOptions(clusterId: string, request: ListClusterChecksRequest, headers: map[string]string, runtime: Util.RuntimeOptions): ListClusterChecksResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.target)) {
    query['target'] = request.target;
  }
  if (!Util.isUnset(request.type)) {
    query['type'] = request.type;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListClusterChecks',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/clusters/${OpenApiUtil.getEncodeParam(clusterId)}/checks`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary You can call the ListClusterChecks operation to query all the cluster check results of a cluster.
 *
 * @param request ListClusterChecksRequest
 * @return ListClusterChecksResponse
 */
async function listClusterChecks(clusterId: string, request: ListClusterChecksRequest): ListClusterChecksResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return listClusterChecksWithOptions(clusterId, request, headers, runtime);
}

model ListClusterKubeconfigStatesRequest {
  pageNumber?: int32(name='pageNumber', description='The page number.

*   Valid values: ≥ 1.
*   Default value: 1.', example='1'),
  pageSize?: int32(name='pageSize', description='The number of entries per page.

*   Valid values: 10 to 50.
*   Default value: 10', example='10'),
}

model ListClusterKubeconfigStatesResponseBody = {
  page?: {
    pageNumber?: int32(name='page_number', description='The page number.', example='1'),
    pageSize?: int32(name='page_size', description='The number of entries per page.', example='10'),
    totalCount?: int32(name='total_count', description='The total number of entries returned.', example='5'),
  }(name='page', description='The pagination information.'),
  states?: [ 
    {
      accountDisplayName?: string(name='account_display_name', description='The displayed name or role name of the RAM user.', example='tom'),
      accountId?: string(name='account_id', description='The ID of an Alibaba Cloud account, RAM user, or RAM role.', example='22855*****************'),
      accountName?: string(name='account_name', description='The logon name or role name of the RAM user.', example='tom'),
      accountState?: string(name='account_state', description='The status of the account.

*   Active: The account is active.
*   InActive: The account is locked.
*   Deleted: The account is deleted.', example='Active'),
      accountType?: string(name='account_type', description='The type of the account.

*   RootAccount: Alibaba Cloud account.
*   RamUser: RAM user.
*   RamRole: RAM role.', example='RamUser'),
      certExpireTime?: string(name='cert_expire_time', description='The expiration time of the client certificate for the kubeconfig file.', example='2027-07-15T01:32:20Z'),
      certState?: string(name='cert_state', description='The status of the client certificate for the kubeconfig file.

*   Unexpired: The certificate is not expired.
*   Expired: The certificate is expired.
*   Unknown: The status of the certificate is unknown.', example='Expired'),
      revokable?: boolean(name='revokable', description='Indicates whether the client certificate for the kubeconfig file can be revoked.', example='true'),
    }
  ](name='states', description='The status list of the kubeconfig files associated with the cluster.'),
}

model ListClusterKubeconfigStatesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListClusterKubeconfigStatesResponseBody(name='body'),
}

/**
 * @summary Queries the kubeconfig files that are issued to users for the current cluster and the status of the kubeconfig files.
 *
 * @description > - To call this operation, make sure that you have ram:ListUsers and ram:ListRoles permissions.
 * > - To call this operation, make sure that you have the AliyunCSFullAccess permissions.
 *
 * @param request ListClusterKubeconfigStatesRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListClusterKubeconfigStatesResponse
 */
async function listClusterKubeconfigStatesWithOptions(ClusterId: string, request: ListClusterKubeconfigStatesRequest, headers: map[string]string, runtime: Util.RuntimeOptions): ListClusterKubeconfigStatesResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.pageNumber)) {
    query['pageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['pageSize'] = request.pageSize;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListClusterKubeconfigStates',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/clusters/${OpenApiUtil.getEncodeParam(ClusterId)}/kubeconfig/states`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Queries the kubeconfig files that are issued to users for the current cluster and the status of the kubeconfig files.
 *
 * @description > - To call this operation, make sure that you have ram:ListUsers and ram:ListRoles permissions.
 * > - To call this operation, make sure that you have the AliyunCSFullAccess permissions.
 *
 * @param request ListClusterKubeconfigStatesRequest
 * @return ListClusterKubeconfigStatesResponse
 */
async function listClusterKubeconfigStates(ClusterId: string, request: ListClusterKubeconfigStatesRequest): ListClusterKubeconfigStatesResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return listClusterKubeconfigStatesWithOptions(ClusterId, request, headers, runtime);
}

model ListOperationPlansRequest {
  clusterId?: string(name='cluster_id', description='The cluster ID.', example='c29ced64b3dfe4f33b57ca0aa9f68****'),
  type?: string(name='type', description='The operation plan type.', example='cluster_upgrade'),
}

model ListOperationPlansResponseBody = {
  plans?: [ 
    {
      clusterId?: string(name='cluster_id', description='The cluster ID.', example='c29ced64b3dfe4f33b57ca0aa9f68****'),
      created?: string(name='created', description='The time when the operation plan was created.', example='2023-11-21T20:01:22+08:00'),
      endTime?: string(name='end_time', description='The expected end time of the plan.', example='2023-11-22T18:00:00+08:00'),
      planId?: string(name='plan_id', description='The operation plan ID.', example='P-655c9c127e0e6603ef00****'),
      startTime?: string(name='start_time', description='The expected start time of the plan.', example='2023-11-22T15:18:00+08:00'),
      state?: string(name='state', description='The plan status. Valid values:

*   scheduled
*   Canceled', example='scheduled'),
      targetId?: string(name='target_id', description='The target ID.', example='c29ced64b3dfe4f33b57ca0aa9f68****'),
      targetType?: string(name='target_type', description='The target type.', example='cluster'),
      taskId?: string(name='task_id', description='The ID of the task generated by the execution plan.', example='T-6764d027be846d01310006b1'),
      type?: string(name='type', description='The plan type. Valid values:

*   cluster_upgrade', example='cluster_upgrade'),
    }
  ](name='plans', description='The list of auto O\\\\&M execution plans.'),
}

model ListOperationPlansResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListOperationPlansResponseBody(name='body'),
}

/**
 * @summary Queries the automated maintenance schedules of a cluster.
 *
 * @param request ListOperationPlansRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListOperationPlansResponse
 */
async function listOperationPlansWithOptions(request: ListOperationPlansRequest, headers: map[string]string, runtime: Util.RuntimeOptions): ListOperationPlansResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.clusterId)) {
    query['cluster_id'] = request.clusterId;
  }
  if (!Util.isUnset(request.type)) {
    query['type'] = request.type;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListOperationPlans',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/operation/plans`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Queries the automated maintenance schedules of a cluster.
 *
 * @param request ListOperationPlansRequest
 * @return ListOperationPlansResponse
 */
async function listOperationPlans(request: ListOperationPlansRequest): ListOperationPlansResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return listOperationPlansWithOptions(request, headers, runtime);
}

model ListTagResourcesRequest {
  nextToken?: string(name='next_token', description='The pagination token that is used in the next request to retrieve a new page of results.', example='***'),
  regionId?: string(name='region_id', description='The region ID.

This parameter is required.', example='cn-beijing'),
  resourceIds?: [ string ](name='resource_ids', description='The list of cluster IDs.

This parameter is required.', example='["xxxxx","xxxxxx"]'),
  resourceType?: string(name='resource_type', description='The resource type. Set the value to `CLUSTER`.

This parameter is required.', example='CLUSTER'),
  tags?: [
    Tag
  ](name='tags', description='The list of labels that you want to query. You can specify up to 20 labels.', example='[{\\\\"key\\\\":\\\\"env\\\\",\\\\"value\\\\",\\\\"dev\\\\"},{\\\\"key\\\\":\\\\"dev\\\\", \\\\"value\\\\":\\\\"IT\\\\"}]'),
}

model ListTagResourcesShrinkRequest {
  nextToken?: string(name='next_token', description='The pagination token that is used in the next request to retrieve a new page of results.', example='***'),
  regionId?: string(name='region_id', description='The region ID.

This parameter is required.', example='cn-beijing'),
  resourceIdsShrink?: string(name='resource_ids', description='The list of cluster IDs.

This parameter is required.', example='["xxxxx","xxxxxx"]'),
  resourceType?: string(name='resource_type', description='The resource type. Set the value to `CLUSTER`.

This parameter is required.', example='CLUSTER'),
  tagsShrink?: string(name='tags', description='The list of labels that you want to query. You can specify up to 20 labels.', example='[{\\\\"key\\\\":\\\\"env\\\\",\\\\"value\\\\",\\\\"dev\\\\"},{\\\\"key\\\\":\\\\"dev\\\\", \\\\"value\\\\":\\\\"IT\\\\"}]'),
}

model ListTagResourcesResponseBody = {
  nextToken?: string(name='next_token', description='The pagination token that is used in the next request to retrieve a new page of results.', example='c374bf4864448****'),
  requestId?: string(name='request_id', description='The request ID.', example='E368C761-F8F6-4A36-9B58-BD53D5CD0CEB'),
  tagResources?: {
    tagResource?: [ 
      {
        resourceId?: string(name='resource_id', description='The ID of the resource.', example='i-xxx'),
        resourceType?: string(name='resource_type', description='The type of the resource. For more information, see [Labels](https://help.aliyun.com/document_detail/110425.html).', example='CLUSTER'),
        tagKey?: string(name='tag_key', description='The key of the label.', example='ack.aliyun.com'),
        tagValue?: string(name='tag_value', description='The value of the label.', example='c71cf3d796c374bf48644482cb0c3****'),
      }
    ](name='tag_resource', description='The resource and label.'),
  }(name='tag_resources', description='The details of the queried labels and resources.'),
}

model ListTagResourcesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListTagResourcesResponseBody(name='body'),
}

/**
 * @summary Queries resource labels and the detailed information, such as the key-value pairs of the labels and the clusters to which the labels are added. You can use labels to classify and manage Container Service for Kubernetes (ACK) clusters in order to meet monitoring, cost analysis, and tenant isolation requirements.
 *
 * @param tmpReq ListTagResourcesRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListTagResourcesResponse
 */
async function listTagResourcesWithOptions(tmpReq: ListTagResourcesRequest, headers: map[string]string, runtime: Util.RuntimeOptions): ListTagResourcesResponse {
  Util.validateModel(tmpReq);
  var request = new ListTagResourcesShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.resourceIds)) {
    request.resourceIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.resourceIds, 'resource_ids', 'json');
  }
  if (!Util.isUnset(tmpReq.tags)) {
    request.tagsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.tags, 'tags', 'json');
  }
  var query : map[string]any = {};
  if (!Util.isUnset(request.nextToken)) {
    query['next_token'] = request.nextToken;
  }
  if (!Util.isUnset(request.regionId)) {
    query['region_id'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceIdsShrink)) {
    query['resource_ids'] = request.resourceIdsShrink;
  }
  if (!Util.isUnset(request.resourceType)) {
    query['resource_type'] = request.resourceType;
  }
  if (!Util.isUnset(request.tagsShrink)) {
    query['tags'] = request.tagsShrink;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListTagResources',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/tags`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Queries resource labels and the detailed information, such as the key-value pairs of the labels and the clusters to which the labels are added. You can use labels to classify and manage Container Service for Kubernetes (ACK) clusters in order to meet monitoring, cost analysis, and tenant isolation requirements.
 *
 * @param request ListTagResourcesRequest
 * @return ListTagResourcesResponse
 */
async function listTagResources(request: ListTagResourcesRequest): ListTagResourcesResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return listTagResourcesWithOptions(request, headers, runtime);
}

model ListUserKubeConfigStatesRequest {
  pageNumber?: int32(name='page_number', description='The page number.

*   Valid values: ≥ 1.
*   Default value: 1.', example='2'),
  pageSize?: int32(name='page_size', description='The number of entries per page.

*   Value values: 1 to 100.
*   Default value: 50.', example='10'),
}

model ListUserKubeConfigStatesResponseBody = {
  page?: {
    pageNumber?: int32(name='page_number', description='The page number of the returned page.', example='1'),
    pageSize?: int32(name='page_size', description='The number of entries per page.', example='10'),
    totalCount?: int32(name='total_count', description='The total number of entries returned.', example='100'),
  }(name='page', description='The pagination information.'),
  states?: [ 
    {
      certExpireTime?: string(name='cert_expire_time', description='The expiration date of the certificate used in a kubeconfig file. Format: the UTC time in the RFC3339 format.', example='2026-11-30T07:41:50Z'),
      certState?: string(name='cert_state', description='The current status of the certificate used in a kubeconfig file. Valid values:

*   Expired: The certificate is expired.
*   Unexpired: The certificate is not expired.
*   Unissued: The certificate is not issued.
*   Unknown: The status of the certificate is unknown.
*   Removed: The certificate is removed. An issue record is found for the certificate.', example='Unissued'),
      clusterId?: string(name='cluster_id', description='The cluster ID.', example='c5b5e80b0b64a4bf6939d2d8fbbc5****'),
      clusterName?: string(name='cluster_name', description='The name of the cluster.

The name must be 1 to 63 characters in length, and can contain digits, underscores (_), and hyphens (-). The name must start with a letter or number.', example='cluster-demo'),
      clusterState?: string(name='cluster_state', description='The status of the cluster. Valid values:

*   `initial`: The cluster is being created.
*   `failed`: The cluster failed to be created.
*   `running`: The cluster is running.
*   `updating`: The cluster is being upgraded.
*   `updating_failed`: The cluster failed to be updated.
*   `scaling`: The cluster is being scaled.
*   `stopped`: The cluster is stopped.
*   `deleting`: The cluster is being deleted.
*   `deleted`: The cluster is deleted.
*   `delete_failed`: The cluster failed to be deleted.', example='running'),
    }
  ](name='states', description='The status of the kubeconfig files.'),
}

model ListUserKubeConfigStatesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListUserKubeConfigStatesResponseBody(name='body'),
}

/**
 * @summary You can call the ListUserKubeConfigStates operation to query the status of the kubeconfig files of all clusters managed by the current user.
 *
 * @description >  To call this operation, make sure that you have the AliyunCSFullAccess permissions.
 *
 * @param request ListUserKubeConfigStatesRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListUserKubeConfigStatesResponse
 */
async function listUserKubeConfigStatesWithOptions(Uid: string, request: ListUserKubeConfigStatesRequest, headers: map[string]string, runtime: Util.RuntimeOptions): ListUserKubeConfigStatesResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.pageNumber)) {
    query['page_number'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['page_size'] = request.pageSize;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListUserKubeConfigStates',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/users/${OpenApiUtil.getEncodeParam(Uid)}/kubeconfig/states`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary You can call the ListUserKubeConfigStates operation to query the status of the kubeconfig files of all clusters managed by the current user.
 *
 * @description >  To call this operation, make sure that you have the AliyunCSFullAccess permissions.
 *
 * @param request ListUserKubeConfigStatesRequest
 * @return ListUserKubeConfigStatesResponse
 */
async function listUserKubeConfigStates(Uid: string, request: ListUserKubeConfigStatesRequest): ListUserKubeConfigStatesResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return listUserKubeConfigStatesWithOptions(Uid, request, headers, runtime);
}

model MigrateClusterRequest {
  ossBucketEndpoint?: string(name='oss_bucket_endpoint', description='The endpoint of the OSS bucket.', example='*******.oss-cn-hangzhou.aliyuncs.com'),
  ossBucketName?: string(name='oss_bucket_name', description='The name of the Object Storage Service (OSS) bucket.', example='bucket-****'),
}

model MigrateClusterResponseBody = {
  clusterId?: string(name='cluster_id', description='The cluster ID.', example='c8155823d057948c69a****'),
  requestId?: string(name='request_id', description='The request ID.', example='20758A-585D-4A41-A9B2-28DA8F4F534F'),
  taskId?: string(name='task_id', description='The task ID.', example='T-62ccd14aacb8db06ca00****'),
}

model MigrateClusterResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: MigrateClusterResponseBody(name='body'),
}

/**
 * @summary Container Service for Kubernetes (ACK) Pro clusters are developed based on ACK Basic clusters. ACK Pro clusters provide all benefits of ACK managed clusters, such as fully-managed control planes and control plane high availability. In addition, ACK Pro clusters provide you with enhanced reliability, security, and schedulability. ACK Pro clusters are covered by the SLA that supports compensation clauses. ACK Pro clusters are suitable for large-scale businesses that require high stability and security in production environments. We recommend that you migrate from ACK Basic clusters to ACK Pro clusters.
 *
 * @param request MigrateClusterRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return MigrateClusterResponse
 */
async function migrateClusterWithOptions(clusterId: string, request: MigrateClusterRequest, headers: map[string]string, runtime: Util.RuntimeOptions): MigrateClusterResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.ossBucketEndpoint)) {
    body['oss_bucket_endpoint'] = request.ossBucketEndpoint;
  }
  if (!Util.isUnset(request.ossBucketName)) {
    body['oss_bucket_name'] = request.ossBucketName;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'MigrateCluster',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/clusters/${OpenApiUtil.getEncodeParam(clusterId)}/migrate`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Container Service for Kubernetes (ACK) Pro clusters are developed based on ACK Basic clusters. ACK Pro clusters provide all benefits of ACK managed clusters, such as fully-managed control planes and control plane high availability. In addition, ACK Pro clusters provide you with enhanced reliability, security, and schedulability. ACK Pro clusters are covered by the SLA that supports compensation clauses. ACK Pro clusters are suitable for large-scale businesses that require high stability and security in production environments. We recommend that you migrate from ACK Basic clusters to ACK Pro clusters.
 *
 * @param request MigrateClusterRequest
 * @return MigrateClusterResponse
 */
async function migrateCluster(clusterId: string, request: MigrateClusterRequest): MigrateClusterResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return migrateClusterWithOptions(clusterId, request, headers, runtime);
}

model ModifyClusterRequest {
  accessControlList?: [ string ](name='access_control_list', description='The network access control list (ACL) of the SLB instance associated with the API server if the cluster is a registered cluster.'),
  apiServerCustomCertSans?: {
    action?: string(name='action', description='Specifies whether to overwrite or add SANs. Valid values:

*   overwrite: overwrites SANs.
*   append: adds SANs.', example='append'),
    subjectAlternativeNames?: [ string ](name='subject_alternative_names', description='The list of SANs.'),
  }(name='api_server_custom_cert_sans', description='The custom subject alternative names (SANs) for the API server certificate to accept requests from specified IP addresses or domain names. This parameter is available only for ACK managed clusters.'),
  apiServerEip?: boolean(name='api_server_eip', description='Specifies whether to associate an elastic IP address (EIP) with the cluster. This EIP is used to enable access to the API server over the Internet. Valid values:

*   `true`: associates an EIP with the cluster.
*   `false`: does not associate an EIP with the cluster.', example='true'),
  apiServerEipId?: string(name='api_server_eip_id', description='The ID of the EIP that you want to associate with the API server of the cluster. This parameter takes effect when `api_server_eip` is set to `true`.', example='eip-wz9fnasl6dsfhmvci****'),
  clusterName?: string(name='cluster_name', description='The cluster name.

The cluster name must be 1 to 63 characters in length, and can contain digits, letters, and hyphens (-). The cluster name cannot start with a hyphen (-).', example='cluster-new-name'),
  controlPlaneConfig?: {
    autoRenew?: boolean(name='auto_renew', description='Specifies whether to enable auto-renewal for control plane nodes. This parameter takes effect only when `charge_type` is set to `PrePaid`. Valid values:

*   `true`: enables auto-renewal.
*   `false`: disables auto-renewal.

Default value: `false`', example='true'),
    autoRenewPeriod?: long(name='auto_renew_period', description='The auto-renewal period of control plane nodes. Valid values: 1, 2, 3, 6, and 12.

Default value: 1.', example='1'),
    chargeType?: string(name='charge_type', description='The billing method of control plane nodes. Valid values:

*   `PrePaid`: subscription.
*   `PostPaid`: pay-as-you-go.

Default value: `PostPaid`.', example='PrePaid'),
    cloudMonitorFlags?: boolean(name='cloud_monitor_flags', description='Specifies whether to install the CloudMonitor agent. Valid values:

*   `true`: installs the CloudMonitor agent.
*   `false`: does not install the CloudMonitor agent.', example='true'),
    cpuPolicy?: string(name='cpu_policy', description='The CPU management policy of nodes in the node pool. The following policies are supported if the Kubernetes version of the cluster is 1.12.6 or later:

*   `static`: allows pods with specific resource characteristics on the node to be granted with enhanced CPU affinity and exclusivity.
*   `none`: specifies that the default CPU affinity is used.

Default value: `none`.', example='none'),
    deploymentsetId?: string(name='deploymentset_id', description='The ID of the deployment set.', example='ds-bp10b35imuam5amw****'),
    imageId?: string(name='image_id', description='The custom image ID. You must configure this parameter if you use a custom image.', example='aliyun_3_x64_20G_alibase_20240819.vhd'),
    imageType?: string(name='image_type', description='The type of the OS image. Valid values:

*   `AliyunLinux3`: Alibaba Cloud Linux 3.
*   `Custom`: the custom image.', example='AliyunLinux3'),
    instanceTypes?: [ string ](name='instance_types', description='The type of instance. For more information, see [Overview of ECS instance families](https://help.aliyun.com/document_detail/25378.html).'),
    keyPair?: string(name='key_pair', description='The name of the key pair. You must configure either this parameter or the `login_password` parameter.', example='ack'),
    loginPassword?: string(name='login_password', description='The password for SSH logon. You must configure either this parameter or the `key_pair` parameter. The password must be 8 to 30 characters in length, and must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters. To log on with a password, you must specify this parameter during the scale-out.', example='Ack@2000.'),
    nodePortRange?: string(name='node_port_range', description='The node port range.', example='30000-32767'),
    period?: long(name='period', description='The subscription duration of the instance. This parameter takes effect and is required only when `charge_type` is set to `PrePaid`.

If `PeriodUnit=Month` is specified, the valid values are 1, 2, 3, 6, 12, 24, 36, 48, and 60.', example='1'),
    periodUnit?: string(name='period_unit', description='The billing cycle of control plane nodes. This parameter takes effect only when `instance_charge_type` is set to `PrePaid`.

Set the value to `Month`.', example='Month'),
    runtime?: string(name='runtime', description='The type of the container runtime. Valid values:

*   `containerd`: supports all Kubernetes versions. We recommend that you set the parameter to this value.

Default value: containerd.', example='containerd'),
    securityHardeningOs?: boolean(name='security_hardening_os', description='Specifies whether to enable Alibaba Cloud Linux Security Hardening. Valid values:

*   `true`: enables Alibaba Cloud Linux Security Hardening.
*   `false`: disables Alibaba Cloud Linux Security Hardening.

Default value: `false`', example='true'),
    size?: long(name='size', description='The number of control plane nodes. If you want to scale out the control plane in an ACK dedicated cluster, set this parameter to the desired number of nodes. This parameter must be greater than the current number of nodes.', example='5'),
    socEnabled?: boolean(name='soc_enabled', description='Specifies whether to enable Multi-Level Protection Scheme (MLPS) security hardening. For more information, see [ACK security hardening based on MLPS](https://help.aliyun.com/document_detail/196148.html).

Valid values:

*   `true`: enables MLPS security hardening.
*   `false`: disables MLPS security hardening.

Default value: `false`.', example='false'),
    systemDiskBurstingEnabled?: boolean(name='system_disk_bursting_enabled', description='Specifies whether to enable the burst feature for the system disk. Valid values:

*   `true`: enables the burst feature.
*   `false`: disables the burst feature.

This parameter is effective only when `system_disk_category` is set to `cloud_auto`. For more information, see [ESSD AutoPL disks](https://help.aliyun.com/document_detail/368372.html).', example='true'),
    systemDiskCategory?: string(name='system_disk_category', description='The category of the system disk for nodes. Valid values:

*   `cloud`: basic disk.
*   `cloud_efficiency`: ultra disk.
*   `cloud_ssd`: standard SSD.
*   `cloud_essd`: Enterprise ESSD (ESSD).
*   `cloud_auto`: ESSD AutoPL disk.
*   `cloud_essd_entry`: ESSD Entry disk.', example='cloud_essd'),
    systemDiskPerformanceLevel?: string(name='system_disk_performance_level', description='The performance level (PL) of the system disk that you want to use for the node. This parameter is effective only for ESSDs. This parameter is related to the disk size. For more information, see [ESSDs](https://help.aliyun.com/document_detail/122389.html).', example='PL1'),
    systemDiskProvisionedIops?: long(name='system_disk_provisioned_iops', description='The preset read/write input/output operations per second (IOPS) of the system disk. Valid values: 0 to min{50,000, 1,000 × Capacity - Baseline IOPS}. Baseline IOPS = min{1,800 + 50 × Capacity, 50,000}.

This parameter is effective only when `system_disk_category` is set to `cloud_auto`. For more information, see [ESSD AutoPL disks](https://help.aliyun.com/document_detail/368372.html).', example='1000'),
    systemDiskSize?: long(name='system_disk_size', description='The type of the system disk. Valid values: [40,500]. Unit: GiB.', example='120'),
    systemDiskSnapshotPolicyId?: string(name='system_disk_snapshot_policy_id', description='The ID of the automatic snapshot policy applied to the node system disk.', example='sp-2zej1nogjvovnz4z****'),
  }(name='control_plane_config', description='The control plane configurations of an ACK dedicated cluster.'),
  deletionProtection?: boolean(name='deletion_protection', description='Specifies whether to enable cluster deletion protection. If you enable this option, the cluster cannot be deleted in the console or by calling API operations. Valid values:

*   `true`: enables cluster deletion protection.
*   `false`: disables cluster deletion protection.

Default value: `false`', example='true'),
  enableRrsa?: boolean(name='enable_rrsa', description='Specifies whether to enable the RAM Roles for Service Accounts (RRSA) feature. This parameter is available only for ACK managed clusters. Valid values:

*   `true`: enables the RRSA feature.
*   `false`: disables the RRSA feature.', example='true'),
  ingressDomainRebinding?: boolean(name='ingress_domain_rebinding', description='Specifies whether to remap the test domain name of the cluster. Valid values:

*   `true`: remaps the test domain name of the cluster.
*   `false`: does not remap the test domain name of the cluster.

Default value: `false`', example='true'),
  ingressLoadbalancerId?: string(name='ingress_loadbalancer_id', description='The ID of the Server Load Balancer (SLB) instance of the cluster to be modified.', example='lb-wz97kes8tnndkpodw****'),
  instanceDeletionProtection?: boolean(name='instance_deletion_protection', description='Specifies whether to enable instance deletion protection. If you enable this option, the instance cannot be deleted in the console or by calling API operations. Valid values:

*   `true`: enables instance deletion protection.
*   `false`: disables instance deletion protection.

Default value: `false`', example='true'),
  maintenanceWindow?: MaintenanceWindow(name='maintenance_window', description='The cluster maintenance window. This feature takes effect only for ACK Pro clusters.'),
  operationPolicy?: {
    clusterAutoUpgrade?: {
      channel?: string(name='channel', description='The frequency of auto cluster update. For more information, see [Update frequency](https://help.aliyun.com/document_detail/2712866.html).

Valid values:

*   patch: the latest patch version.
*   stables: the second-latest minor version.
*   rapid: the latest minor version.', example='patch'),
      enabled?: boolean(name='enabled', description='Specifies whether to enable automatic update.', example='true'),
    }(name='cluster_auto_upgrade', description='The configurations of automatic update.'),
  }(name='operation_policy', description='The automatic O\\\\&M policy of the cluster.'),
  resourceGroupId?: string(name='resource_group_id', description='The resource group ID of the cluster.', example='rg-acfmyvw3wjm****'),
  securityGroupId?: string(name='security_group_id', description='The ID of the security group for the control plane. 

- If block rules are configured in the security group, ensure the security group rules allow traffic for protocols and ports required by the cluster. For recommended security group rules, see [Configure and manage security groups for an ACK cluster](https://www.alibabacloud.com/help/en/ack/ack-managed-and-ack-dedicated/user-guide/configure-security-group-rules-to-enforce-access-control-on-ack-clusters?spm=a2c63.p38356.help-menu-85222.d_2_0_4_3.43e35d09s8oSlR).

- For non-ACK dedicated clusters: 
  - During security group updates, the cluster control plane and managed components (e.g., terway-controlplane) will restart briefly. Perform this operation during off-peak hours.
  - After updating the control plane security group, the Elastic Network Interfaces (ENIs) used by the control plane and managed components will automatically join the new security group.

- For ACK dedicated clusters:
   - After updating the control plane security group, newly scaled-out master nodes will automatically apply the new security group. Existing control plane nodes remain unaffected.', example='sg-bp1h6rk3pgct2a08***'),
  systemEventsLogging?: {
    enabled?: boolean(name='enabled', description='Specifies whether to enable system event storage.', example='true'),
    loggingProject?: string(name='logging_project', description='The name of the Simple Log Service project that stores system events.', example='k8s-log-cb95aa626a47740afbf6aa099b65****'),
  }(name='system_events_logging', description='The storage configurations of system events.'),
  timezone?: string(name='timezone', description='The time zone configuration for the cluster.

- After modifying the time zone, cluster inspection configurations will adopt the new time zone.

- For ACK managed clusters:
   - During time zone updates, the cluster control plane and managed components (e.g., terway-controlplane) will restart briefly. Perform this operation during off-peak hours.
   - After updating the time zone:
      - Newly scaled-out nodes will automatically apply the new time zone.
      - Existing nodes remain unaffected. Reset the node to apply changes to existing nodes.

- For ACK dedicated clusters:
   - After updating the time zone:
      - Newly scaled-out nodes (including control plane nodes) automatically apply the new time zone.
      - Existing nodes (including control plane nodes) remain unaffected. Reset the node to apply changes to existing nodes.
      - For control plane nodes, perform a scale-out followed by a scale-in to apply the new time zone to all control plane nodes.', example='Asia/Shanghai'),
  vswitchIds?: [ string ](name='vswitch_ids', description='The vSwitches of the control plane. This parameter can be used to change the vSwitches of the control plane in an ACK managed cluster. Take note of the following items:

*   This parameter overwrites the existing configuration. You must specify all vSwitches of the control plane.
*   The control plane components restarts during the change process. Exercise caution when you perform this operation.
*   Ensure that all security groups of the cluster, including the security groups of the control plane, all node pools, and container network, are allowed to access the CIDR blocks of the new vSwitches. This ensures that the nodes and containers can connect to the API server.
*   If the new vSwitches of the control plane are configured with an ACL, ensure that the ACL allows communication between the new vSwitches and CIDR blocks such as those of the cluster nodes and the container network.'),
}

model ModifyClusterResponseBody = {
  clusterId?: string(name='cluster_id', description='The cluster ID.', example='cb95aa626a47740afbf6aa09****'),
  requestId?: string(name='request_id', description='The request ID.', example='687C5BAA-D103-4993-884B-C35E4314****'),
  taskId?: string(name='task_id', description='The task ID.', example='T-5a54309c80282e39ea00****'),
}

model ModifyClusterResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyClusterResponseBody(name='body'),
}

/**
 * @summary You can call the ModifyCluster operation to modify the cluster configurations by cluster ID.
 *
 * @param request ModifyClusterRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyClusterResponse
 */
async function modifyClusterWithOptions(ClusterId: string, request: ModifyClusterRequest, headers: map[string]string, runtime: Util.RuntimeOptions): ModifyClusterResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.accessControlList)) {
    body['access_control_list'] = request.accessControlList;
  }
  if (!Util.isUnset(request.apiServerCustomCertSans)) {
    body['api_server_custom_cert_sans'] = request.apiServerCustomCertSans;
  }
  if (!Util.isUnset(request.apiServerEip)) {
    body['api_server_eip'] = request.apiServerEip;
  }
  if (!Util.isUnset(request.apiServerEipId)) {
    body['api_server_eip_id'] = request.apiServerEipId;
  }
  if (!Util.isUnset(request.clusterName)) {
    body['cluster_name'] = request.clusterName;
  }
  if (!Util.isUnset(request.controlPlaneConfig)) {
    body['control_plane_config'] = request.controlPlaneConfig;
  }
  if (!Util.isUnset(request.deletionProtection)) {
    body['deletion_protection'] = request.deletionProtection;
  }
  if (!Util.isUnset(request.enableRrsa)) {
    body['enable_rrsa'] = request.enableRrsa;
  }
  if (!Util.isUnset(request.ingressDomainRebinding)) {
    body['ingress_domain_rebinding'] = request.ingressDomainRebinding;
  }
  if (!Util.isUnset(request.ingressLoadbalancerId)) {
    body['ingress_loadbalancer_id'] = request.ingressLoadbalancerId;
  }
  if (!Util.isUnset(request.instanceDeletionProtection)) {
    body['instance_deletion_protection'] = request.instanceDeletionProtection;
  }
  if (!Util.isUnset(request.maintenanceWindow)) {
    body['maintenance_window'] = request.maintenanceWindow;
  }
  if (!Util.isUnset(request.operationPolicy)) {
    body['operation_policy'] = request.operationPolicy;
  }
  if (!Util.isUnset(request.resourceGroupId)) {
    body['resource_group_id'] = request.resourceGroupId;
  }
  if (!Util.isUnset(request.securityGroupId)) {
    body['security_group_id'] = request.securityGroupId;
  }
  if (!Util.isUnset(request.systemEventsLogging)) {
    body['system_events_logging'] = request.systemEventsLogging;
  }
  if (!Util.isUnset(request.timezone)) {
    body['timezone'] = request.timezone;
  }
  if (!Util.isUnset(request.vswitchIds)) {
    body['vswitch_ids'] = request.vswitchIds;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ModifyCluster',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/api/v2/clusters/${OpenApiUtil.getEncodeParam(ClusterId)}`,
    method = 'PUT',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary You can call the ModifyCluster operation to modify the cluster configurations by cluster ID.
 *
 * @param request ModifyClusterRequest
 * @return ModifyClusterResponse
 */
async function modifyCluster(ClusterId: string, request: ModifyClusterRequest): ModifyClusterResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return modifyClusterWithOptions(ClusterId, request, headers, runtime);
}

model ModifyClusterAddonRequest {
  config?: string(name='config', description='The custom parameter settings that you want to use.', example='{"CpuRequest":"800m"}'),
}

model ModifyClusterAddonResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
}

/**
 * @summary Modifies the configuration of a cluster component. This operation may affect your businesses. We recommend that you assess the impact, back up data, and perform the operation during off-peak hours.
 *
 * @description You can call this API operation to modify the component parameters of an ACK Basic cluster or the control plane parameters of an ACK Pro cluster:
 * *   To view the component parameters of an ACK Basic cluster, call the DescribeClusterAddonMetadata API operation. For more information, see [Query the metadata of a cluster component](https://help.aliyun.com/document_detail/2667944.html).
 * *   To view the control plane parameters of an ACK Pro cluster, see [Customize the control plane parameters of an ACK Pro cluster](https://help.aliyun.com/document_detail/199588.html).
 * After you call this operation, the component may be redeployed and restarted. We recommend that you assess the impact before you call this operation.
 *
 * @param request ModifyClusterAddonRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyClusterAddonResponse
 */
async function modifyClusterAddonWithOptions(clusterId: string, componentId: string, request: ModifyClusterAddonRequest, headers: map[string]string, runtime: Util.RuntimeOptions): ModifyClusterAddonResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.config)) {
    body['config'] = request.config;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ModifyClusterAddon',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/clusters/${OpenApiUtil.getEncodeParam(clusterId)}/components/${OpenApiUtil.getEncodeParam(componentId)}/config`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'none',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Modifies the configuration of a cluster component. This operation may affect your businesses. We recommend that you assess the impact, back up data, and perform the operation during off-peak hours.
 *
 * @description You can call this API operation to modify the component parameters of an ACK Basic cluster or the control plane parameters of an ACK Pro cluster:
 * *   To view the component parameters of an ACK Basic cluster, call the DescribeClusterAddonMetadata API operation. For more information, see [Query the metadata of a cluster component](https://help.aliyun.com/document_detail/2667944.html).
 * *   To view the control plane parameters of an ACK Pro cluster, see [Customize the control plane parameters of an ACK Pro cluster](https://help.aliyun.com/document_detail/199588.html).
 * After you call this operation, the component may be redeployed and restarted. We recommend that you assess the impact before you call this operation.
 *
 * @param request ModifyClusterAddonRequest
 * @return ModifyClusterAddonResponse
 */
async function modifyClusterAddon(clusterId: string, componentId: string, request: ModifyClusterAddonRequest): ModifyClusterAddonResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return modifyClusterAddonWithOptions(clusterId, componentId, request, headers, runtime);
}

model ModifyClusterConfigurationRequest {
  customizeConfig?: [ 
    {
      configs?: [ 
        {
          key?: string(name='key', description='The name of the configuration item.', example='MaxRequestsInflight'),
          value?: string(name='value', description='The value of the configuration item.', example='100'),
        }
      ](name='configs', description='The custom configurations.'),
      name?: string(name='name', description='The name of the component.', example='kube-apiserver'),
    }
  ](name='customize_config', description='The custom configurations.'),
}

model ModifyClusterConfigurationResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
}

/**
 * @deprecated OpenAPI ModifyClusterConfiguration is deprecated
 *
 * @summary This API operation applies only to Container Service for Kubernetes (ACK) managed clusters.
 *
 * @param request ModifyClusterConfigurationRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyClusterConfigurationResponse
 */
// Deprecated
async function modifyClusterConfigurationWithOptions(ClusterId: string, request: ModifyClusterConfigurationRequest, headers: map[string]string, runtime: Util.RuntimeOptions): ModifyClusterConfigurationResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.customizeConfig)) {
    body['customize_config'] = request.customizeConfig;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ModifyClusterConfiguration',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/clusters/${OpenApiUtil.getEncodeParam(ClusterId)}/configuration`,
    method = 'PUT',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'none',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @deprecated OpenAPI ModifyClusterConfiguration is deprecated
 *
 * @summary This API operation applies only to Container Service for Kubernetes (ACK) managed clusters.
 *
 * @param request ModifyClusterConfigurationRequest
 * @return ModifyClusterConfigurationResponse
 */
// Deprecated
async function modifyClusterConfiguration(ClusterId: string, request: ModifyClusterConfigurationRequest): ModifyClusterConfigurationResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return modifyClusterConfigurationWithOptions(ClusterId, request, headers, runtime);
}

model ModifyClusterNodePoolRequest {
  autoScaling?: {
    eipBandwidth?: long(name='eip_bandwidth', description='The maximum bandwidth of the EIP.', example='5', deprecated=true),
    eipInternetChargeType?: string(name='eip_internet_charge_type', description='The billing method of the EIP. Valid values:

*   `PayByBandwidth`: pay-by-bandwidth
*   `PayByTraffic`: pay-by-data-transfer

Default value: `PayByBandwidth`.', example='PayByBandwidth', deprecated=true),
    enable?: boolean(name='enable', description='Specifies whether to enable auto scaling. Valid values:

*   `true`: enables auto scaling for the node pool.
*   `false`: disables auto scaling for the node pool. If you set this parameter to false, other parameters in `auto_scaling` do not take effect.

Default value: `false`', example='true'),
    isBondEip?: boolean(name='is_bond_eip', description='Specifies whether to associate an elastic IP address (EIP) with the node pool. Valid values:

*   `true`: An EIP is associated with the node pool.
*   `false`: No EIP is associated with the node pool.

Default value: `false`', example='true', deprecated=true),
    maxInstances?: long(name='max_instances', description='The maximum number of instances.', example='10'),
    minInstances?: long(name='min_instances', description='The minimum number of instances.', example='2'),
    type?: string(name='type', description='The instance type that is used for auto scaling. Valid values:

*   `cpu`: regular instance
*   `gpu`: GPU-accelerated instance.
*   `gpushare`: shared GPU-accelerated instance.
*   `spot`: preemptible instance.

Default value: `cpu`.', example='cpu', deprecated=true),
  }(name='auto_scaling', description='The configurations about auto scaling.'),
  concurrency?: boolean(name='concurrency', description='Specifies whether concurrency is supported.', example='true'),
  kubernetesConfig?: {
    cmsEnabled?: boolean(name='cms_enabled', description='Specifies whether to install the CloudMonitor agent on ECS nodes. After the CloudMonitor agent is installed on ECS nodes, you can view monitoring information about the instances in the CloudMonitor console. We recommend that you install the CloudMonitor agent. Valid values:

*   `true`: installs the CloudMonitor agent on ECS nodes.
*   `false`: does not install the CloudMonitor agent on ECS nodes.

Default value: `false`', example='true'),
    cpuPolicy?: string(name='cpu_policy', description='The CPU management policy of nodes in the node pool. The following policies are supported if the Kubernetes version of the cluster is 1.12.6 or later:

*   `static`: allows pods with specific resource characteristics on the node to be granted with enhanced CPU affinity and exclusivity
*   `none`: specifies that the default CPU affinity is used

Default value: `none`.', example='none'),
    labels?: [
      Tag
    ](name='labels', description='The labels of the nodes in the node pool. You can add labels to the nodes in the cluster. You must add labels based on the following rules:

*   A label is a case-sensitive key-value pair. You can add up to 20 labels.
*   The key must be unique and cannot exceed 64 characters in length. The value can be empty and cannot exceed 128 characters in length. Keys and values cannot start with `aliyun`, `acs:`, `https://`, or `http://`. For more information, see [Labels and Selectors](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#syntax-and-character-set).'),
    preUserData?: string(name='pre_user_data', description='The user-defined script that is executed before nodes are initialized. For more information, see [Prepare user data](https://help.aliyun.com/document_detail/49121.html).', example='IyEvdXNyL2Jpbi9iYXNoCmVjaG8gIkhlbGxvIEFDSyEi'),
    runtime?: string(name='runtime', description='The name of the container runtime.', example='docker'),
    runtimeVersion?: string(name='runtime_version', description='The version of the container runtime.', example='19.03.5'),
    taints?: [
      Taint
    ](name='taints', description='The configurations of node taints.'),
    unschedulable?: boolean(name='unschedulable', description='Specifies whether the nodes are unschedulable after a scale-out activity is performed.', example='false'),
    userData?: string(name='user_data', description='The user-defined script that is executed after nodes are initialized. For more information, see [Prepare user data](https://help.aliyun.com/document_detail/49121.html).', example='IyEvdXNyL2Jpbi9iYXNoCmVjaG8gIkhlbGxvIEFDSyEi'),
  }(name='kubernetes_config', description='The configurations of the cluster in which the node pool is deployed.'),
  management?: {
    autoRepair?: boolean(name='auto_repair', description='Specifies whether to enable auto repair. This parameter takes effect only when you specify `enable=true`. Valid values:

*   `true`: enables auto repair.
*   `false`: disables auto repair.

Default value: `true`.', example='true'),
    autoRepairPolicy?: {
      restartNode?: boolean(name='restart_node', description='Specifies whether ACK is allowed to automatically restart nodes after repairing the nodes. Valid values:

*   `true`: yes.
*   `false`: no.', example='true'),
    }(name='auto_repair_policy', description='The auto node repair policy.'),
    autoUpgrade?: boolean(name='auto_upgrade', description='Indicates whether auto update is enabled. Valid values:

*   `true`: enables auto update.
*   `false`: disables auto update.', example='true'),
    autoUpgradePolicy?: {
      autoUpgradeKubelet?: boolean(name='auto_upgrade_kubelet', description='Specifies whether ACK is allowed to automatically update the kubelet. Valid values:

*   `true`: yes.
*   `false`: no.', example='true'),
      autoUpgradeOs?: boolean(name='auto_upgrade_os', description='Specifies whether ACK is allowed to automatically update the operating system. This parameter takes effect only when you specify `auto_upgrade=true`. Valid values:

*   `true`: yes.
*   `false`: no.

Default value: `false`.'),
      autoUpgradeRuntime?: boolean(name='auto_upgrade_runtime', description='Specifies whether ACK is allowed to automatically update the runtime. This parameter takes effect only when you specify `auto_upgrade=true`. Valid values:

*   `true`: yes.
*   `false`: no.

Default value: `false`.'),
    }(name='auto_upgrade_policy', description='The auto update policy.'),
    autoVulFix?: boolean(name='auto_vul_fix', description='Specifies whether ACK is allowed to automatically patch CVE vulnerabilities. Valid values:

*   `true`: eanbles auto CVE patching.
*   `true`: disables auto CVE patching.', example='true'),
    autoVulFixPolicy?: {
      restartNode?: boolean(name='restart_node', description='Specifies whether ACK is allowed to automatically restart nodes after repairing the nodes. Valid values:

*   `true`: yes.
*   `false`: no.', example='true'),
      vulLevel?: string(name='vul_level', description='The severity levels of vulnerabilities that ACK is allowed to automatically patch. Multiple severity levels are separated by commas (,).', example='asap,nntf'),
    }(name='auto_vul_fix_policy', description='The auto CVE patching policy.'),
    enable?: boolean(name='enable', description='Specifies whether to enable the managed node pool feature. Valid values:

*   `true`: enables the managed node pool feature.
*   `false`: disables the managed node pool feature. Other parameters in this section take effect only when `enable=true` is specified.

Default value: `false`', example='true'),
    upgradeConfig?: {
      autoUpgrade?: boolean(name='auto_upgrade', description='Specifies whether to enable auto update. Valid values:

*   true: enables auto update.
*   false: disables auto update.

Default value: `true`.', example='true', deprecated=true),
      maxUnavailable?: long(name='max_unavailable', description='The maximum number of nodes that can be in the Unavailable state.

Valid values: 1 to 1000.

Default value: 1', example='1'),
      surge?: long(name='surge', description='The number of nodes that are temporarily added to the node pool during an auto upgrade. Additional nodes are used to host the workloads of nodes that are being updated.

>  We recommend that you set the number of additional nodes to a value that does not exceed the current number of existing nodes.', example='5'),
      surgePercentage?: long(name='surge_percentage', description='The percentage of additional nodes to the nodes in the node pool. You must set this parameter or `surge`.', example='0'),
    }(name='upgrade_config', description='The configuration of auto update. The configuration takes effect only when `enable=true` is specified.', deprecated=true),
  }(name='management', description='The configuration of the managed node pool feature.'),
  nodepoolInfo?: {
    name?: string(name='name', description='The name of a node pool.

The name must be 1 to 63 characters in length, and can contain digits, letters, and hyphens (-). It cannot start with a hyphen (-).', example='default-nodepool'),
    resourceGroupId?: string(name='resource_group_id', description='The resource group ID to which the instance belongs.', example='rg-acfmyvw3wjm****'),
  }(name='nodepool_info', description='The configuration of the node pool.'),
  scalingGroup?: {
    autoRenew?: boolean(name='auto_renew', description='Specifies whether to enable auto-renewal for the nodes in the node pool. This parameter takes effect only when you set `instance_charge_type` to `PrePaid`. Valid values:

*   `true`: enables auto-renewal
*   `false`: disables auto-renewal.

Default value: `false`', example='true'),
    autoRenewPeriod?: long(name='auto_renew_period', description='The auto-renewal period. Valid values:

*   Valid values when PeriodUnit is set to Week: 1, 2, and 3
*   Valid values when PeriodUnit is set to Month: 1, 2, 3, 6, 12, 24, 36, 48, and 60

Default value: 1', example='1'),
    compensateWithOnDemand?: boolean(name='compensate_with_on_demand', description='Specifies whether to automatically create pay-as-you-go instances to meet the required number of ECS instances if preemptible instances cannot be created due to reasons such as the cost or insufficient inventory. This parameter takes effect only when you set `multi_az_policy` to `COST_OPTIMIZED`. Valid values:

*   `true`: automatically creates pay-as-you-go instances to meet the required number of ECS instances if preemptible instances cannot be created
*   `false`', example='true'),
    dataDisks?: [
      DataDisk
    ](name='data_disks', description='The configurations of the data disks that are mounted to nodes in the node pool. Valid values: 0 to 10. You can mount at most 10 data disks to the nodes in the node pool.'),
    desiredSize?: long(name='desired_size', description='The expected number of nodes in the node pool.', example='2'),
    imageId?: string(name='image_id', description='The custom image ID. You can call the `DescribeKubernetesVersionMetadata` operation to query the supported images. By default, the latest image is used.', example='aliyun_2_1903_x64_20G_alibase_20200904.vhd'),
    imageType?: string(name='image_type', description='The type of operating system distribution that you want to use. We recommend that you use this parameter to specify the node operating system. Valid values:

*   `AliyunLinux`: Alibaba Cloud Linux 2.
*   `AliyunLinuxSecurity`: Alibaba Cloud Linux 2 (UEFI).
*   `AliyunLinux3`: Alibaba Cloud Linux 3
*   `AliyunLinux3Arm64`: Alibaba Cloud Linux 3 (ARM).
*   `AliyunLinux3Security`: Alibaba Cloud Linux 3 (UEFI).
*   `CentOS`: CentOS.
*   `Windows`: Windows.
*   `WindowsCore`: Windows Core.
*   `ContainerOS`: ContainerOS.
*   `AliyunLinux3ContainerOptimized`: Alibaba Cloud Linux 3 Container-optimized image.', example='AliyunLinux'),
    instanceChargeType?: string(name='instance_charge_type', description='The billing method of nodes in the node pool. Valid values:

*   `PrePaid`: subscription
*   `PostPaid`: pay-as-you-go

Default value: `PostPaid`', example='PostPaid'),
    instancePatterns?: [
      InstancePatterns
    ](name='instance_patterns', description='The instance attributes.'),
    instanceTypes?: [ string ](name='instance_types', description='The instance types. You can specify multiple instance types. A node is assigned the instance type from the first instance type of the list until the node is created. The instance type that is used to create the node varies based on the actual instance stock.'),
    internetChargeType?: string(name='internet_charge_type', description='The billing method of the public IP address. Valid values:

*   `PayByBandwidth`: pay-by-bandwidth
*   `PayByTraffic`: pay-by-data-transfer', example='PayByBandwidth'),
    internetMaxBandwidthOut?: long(name='internet_max_bandwidth_out', description='The maximum outbound bandwidth of the public IP address of the node. Unit: Mbit/s. Valid values: 1 to 100.', example='5'),
    keyPair?: string(name='key_pair', description='The name of the key pair. You must specify this parameter or `login_password`. You must specify the `key_pair` parameter if the node pool is a managed node pool.', example='pro-nodepool'),
    loginPassword?: string(name='login_password', description='The password for SSH logon. You must specify this parameter or `key_pair`. The password must be 8 to 30 characters in length, and must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters.', example='Hello1234'),
    multiAzPolicy?: string(name='multi_az_policy', description='The ECS instance scaling policy for the multi-zone scaling group. Valid values:

*   `PRIORITY`: The scaling group is scaled based on the VSwitchIds.N parameter. If an ECS instance cannot be created in the zone in which the vSwitch that has the highest priority resides, Auto Scaling creates the ECS instance in the zone in which the vSwitch that has the next highest priority resides.

*   `COST_OPTIMIZED`: ECS instances are created based on the vCPU unit price in ascending order. Preemptible instances are preferably created when preemptible instance types are specified in the scaling configurations. You can specify `CompensateWithOnDemand` to specify whether to automatically create pay-as-you-go instances when preemptible instances cannot be created due to insufficient resources.

    **

    **Note** `COST_OPTIMIZED` is valid only when multiple instance types are specified or at least one preemptible instance type is specified.

*   `BALANCE`: ECS instances are evenly distributed across multiple zones specified by the scaling group. If ECS instances become imbalanced among multiple zones due to the insufficient inventory, you can call the `RebalanceInstances` operation of Auto Scaling to balance the instance distribution among zones. For more information, see [RebalanceInstances](https://help.aliyun.com/document_detail/71516.html).

Default value: `PRIORITY`.', example='BALANCE'),
    onDemandBaseCapacity?: long(name='on_demand_base_capacity', description='The minimum number of pay-as-you-go instances that must be kept in the scaling group. Valid values: 0 to 1000. If the number of pay-as-you-go instances is smaller than the value of this parameter, Auto Scaling preferably creates pay-as-you-go instances.', example='0'),
    onDemandPercentageAboveBaseCapacity?: long(name='on_demand_percentage_above_base_capacity', description='The percentage of pay-as-you-go instances among the extra instances that exceed the number specified by `on_demand_base_capacity`. Valid values: 0 to 100.', example='20'),
    period?: long(name='period', description='The subscription duration of the nodes in the node pool. This parameter takes effect and is required only when you set `instance_charge_type` to `PrePaid`.

Valid values if `period_unit` is set to Month: 1, 2, 3, 6, 12, 24, 36, 48, and 60.', example='1'),
    periodUnit?: string(name='period_unit', description='The billing cycle of the nodes in the node pool. This parameter is required if you set `instance_charge_type` to `PrePaid`. Valid values:

The billing cycle is measured only in months.

Default value: `Month`.', example='Month'),
    platform?: string(name='platform', description='The OS platform. Valid values:

*   `AliyunLinux`
*   `CentOS`
*   `Windows`
*   `WindowsCore`', example='AliyunLinux', deprecated=true),
    privatePoolOptions?: {
      id?: string(name='id', description='The private node pool ID.', example='eap-bp67acfmxazb4****'),
      matchCriteria?: string(name='match_criteria', description='The type of private node pool. This parameter specifies the type of private node pool that you want to use to create instances. A private pool is generated when an elasticity assurance or a capacity reservation takes effect. The system selects a private pool to start instances. Valid values:

*   `Open`: uses an open private pool. The system selects an open private pool to start instances. If no matching open private pools are available, the resources in the public pool are used.
*   `Target`: uses a specified private pool. The system uses the resources of the specified private pool to start instances. If the specified private pool is unavailable, instances cannot be started.
*   `None`: does not use private pools. The resources of private node pools are not used to launch instances.', example='Open'),
    }(name='private_pool_options', description='The configuration of the private node pool.'),
    rdsInstances?: [ string ](name='rds_instances', description='The ApsaraDB RDS instances.'),
    scalingPolicy?: string(name='scaling_policy', description='The scaling mode of the scaling group. Valid values:

*   `release`: the standard mode. ECS instances are created and released based on resource usage.
*   `recycle`: the swift mode. ECS instances are created, stopped, or started during scaling events. This reduces the time required for the next scale-out event. When the instance is stopped, you are charged only for the storage service. This does not apply to ECS instances that are attached to local disks.', example='release'),
    spotInstancePools?: long(name='spot_instance_pools', description='The number of instance types that are available for creating preemptible instances. Auto Scaling creates preemptible instances of multiple instance types that are available at the lowest cost. Valid values: 1 to 10.', example='5'),
    spotInstanceRemedy?: boolean(name='spot_instance_remedy', description='Indicates whether preemptible instances can be supplemented. If the supplementation of preemptible instances is enabled, when the scaling group receives a system message that a preemptible instance is to be reclaimed, the scaling group attempts to create a new instance to replace this instance. Valid values:

*   `true`: supplements preemptible instances.
*   `false`: does not supplement preemptible instances.', example='false'),
    spotPriceLimit?: [ 
      {
        instanceType?: string(name='instance_type', description='The price cap of a preemptible instance.', example='ecs.c6.large'),
        priceLimit?: string(name='price_limit', description='The maximum bid price of a preemptible instance.

Unit: USD/hour.', example='0.39'),
      }
    ](name='spot_price_limit', description='The bid configurations of preemptible instances.'),
    spotStrategy?: string(name='spot_strategy', description='The bidding policy of preemptible instances. Valid values:

*   `NoSpot`: non-preemptible instance.
*   `SpotWithPriceLimit`: specifies the highest bid.
*   `SpotAsPriceGo`: automatically submits bids based on the up-to-date market price.

For more information, see [Create a preemptible elastic container instance](https://help.aliyun.com/document_detail/157759.html).', example='SpotWithPriceLimit'),
    systemDiskBurstingEnabled?: boolean(name='system_disk_bursting_enabled', description='Specifies whether to enable Burst for the system disk when the disk type is cloud_auto.', example='true'),
    systemDiskCategories?: [ string ](name='system_disk_categories', description='The system disk types. The system attempts to create system disks of a disk type with a lower priority if the disk type with a higher priority is unavailable. Valid values: cloud: disk. cloud_efficiency: Ultra disk. cloud_ssd: Standard SSD. cloud_essd: Enterprise SSD (ESSD).'),
    systemDiskCategory?: string(name='system_disk_category', description='The type of system disk. Valid values:

*   `cloud_efficiency`: ultra disk
*   `cloud_ssd`: standard SSD

Default value: `cloud_ssd`', example='cloud_efficiency'),
    systemDiskEncryptAlgorithm?: string(name='system_disk_encrypt_algorithm', description='The encryption algorithm that is used by the system disk. The value is aes-256.', example='aes-256'),
    systemDiskEncrypted?: boolean(name='system_disk_encrypted', description='Indicates whether the system disk is encrypted. Valid values: true false: does not encrypt the system disk.', example='false'),
    systemDiskKmsKeyId?: string(name='system_disk_kms_key_id', description='The ID of the Key Management Service (KMS) key that is used to encrypt the system disk.', example='0e478b7a-4262-4802-b8cb-00d3fb40****'),
    systemDiskPerformanceLevel?: string(name='system_disk_performance_level', description='The performance level (PL) of the system disk that you want to use for the node. This parameter takes effect only for ESSDs. You can specify a higher PL if you increase the size of the data disk. For more information, see [ESSDs](https://help.aliyun.com/document_detail/122389.html).', example='PL1'),
    systemDiskProvisionedIops?: long(name='system_disk_provisioned_iops', description='The predefined read and write IOPS of the system disk when the disk type is cloud_auto.', example='1000'),
    systemDiskSize?: long(name='system_disk_size', description='The size of the system disk in GiB.

Valid values: 20 to 500.

The value of this parameter must be at least 20 and greater than or equal to the size of the image.

Default value: the greater value between 40 and the image size.', example='120'),
    tags?: [
      Tag
    ](name='tags', description='The tags that you want to add only to ECS instances.

The label key must be unique and cannot exceed 128 characters in length. The label key and value cannot start with aliyun or acs: and cannot contain https:// or http://.'),
    vswitchIds?: [ string ](name='vswitch_ids', description='The IDs of vSwitches. You can specify 1 to 20 vSwitches.

>  To ensure high availability, we recommend that you select vSwitches that reside in different zones.'),
  }(name='scaling_group', description='The configuration of the scaling group.'),
  teeConfig?: {
    teeEnable?: boolean(name='tee_enable', description='Specifies whether to enable confidential computing for the cluster. Valid values:

*   `true`: enables confidential computing for the cluster.
*   `false`: disables confidential computing for the cluster.

Default value: `false`', example='false'),
  }(name='tee_config', description='The configurations about confidential computing for the cluster.'),
  updateNodes?: boolean(name='update_nodes', description='Specifies whether to update node information, such as labels and taints.', example='true'),
}

model ModifyClusterNodePoolResponseBody = {
  nodepoolId?: string(name='nodepool_id', description='The node pool ID.', example='np737c3ac1ac684703b9e10673aa2c****'),
  requestId?: string(name='request_id', description='The ID of the request.', example='687C5BAA-D103-4993-884B-C35E4314****'),
  taskId?: string(name='task_id', description='The task ID.', example='T-5fd211e924e1d00787000293'),
}

model ModifyClusterNodePoolResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyClusterNodePoolResponseBody(name='body'),
}

/**
 * @summary You can call the ModifyClusterNodePool operation to modify the configuration of a node pool with the specified node pool ID.
 *
 * @param request ModifyClusterNodePoolRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyClusterNodePoolResponse
 */
async function modifyClusterNodePoolWithOptions(ClusterId: string, NodepoolId: string, request: ModifyClusterNodePoolRequest, headers: map[string]string, runtime: Util.RuntimeOptions): ModifyClusterNodePoolResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.autoScaling)) {
    body['auto_scaling'] = request.autoScaling;
  }
  if (!Util.isUnset(request.concurrency)) {
    body['concurrency'] = request.concurrency;
  }
  if (!Util.isUnset(request.kubernetesConfig)) {
    body['kubernetes_config'] = request.kubernetesConfig;
  }
  if (!Util.isUnset(request.management)) {
    body['management'] = request.management;
  }
  if (!Util.isUnset(request.nodepoolInfo)) {
    body['nodepool_info'] = request.nodepoolInfo;
  }
  if (!Util.isUnset(request.scalingGroup)) {
    body['scaling_group'] = request.scalingGroup;
  }
  if (!Util.isUnset(request.teeConfig)) {
    body['tee_config'] = request.teeConfig;
  }
  if (!Util.isUnset(request.updateNodes)) {
    body['update_nodes'] = request.updateNodes;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ModifyClusterNodePool',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/clusters/${OpenApiUtil.getEncodeParam(ClusterId)}/nodepools/${OpenApiUtil.getEncodeParam(NodepoolId)}`,
    method = 'PUT',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary You can call the ModifyClusterNodePool operation to modify the configuration of a node pool with the specified node pool ID.
 *
 * @param request ModifyClusterNodePoolRequest
 * @return ModifyClusterNodePoolResponse
 */
async function modifyClusterNodePool(ClusterId: string, NodepoolId: string, request: ModifyClusterNodePoolRequest): ModifyClusterNodePoolResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return modifyClusterNodePoolWithOptions(ClusterId, NodepoolId, request, headers, runtime);
}

model ModifyClusterTagsRequest {
  body?: [
    Tag
  ](name='body', description='The data of the tags that you want to modify.'),
}

model ModifyClusterTagsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
}

/**
 * @summary You can add labels in key-value pairs to clusters. This allows cluster developers or O\\\\\\&M engineers to classify and manage clusters in a more flexible manner. This also meets the requirements for monitoring, cost analysis, and tenant isolation. You can call the ModifyClusterTags operation to modify the labels of a cluster.
 *
 * @param request ModifyClusterTagsRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyClusterTagsResponse
 */
async function modifyClusterTagsWithOptions(ClusterId: string, request: ModifyClusterTagsRequest, headers: map[string]string, runtime: Util.RuntimeOptions): ModifyClusterTagsResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = Util.toArray(request.body),
  };
  var params = new OpenApi.Params{
    action = 'ModifyClusterTags',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/clusters/${OpenApiUtil.getEncodeParam(ClusterId)}/tags`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'none',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary You can add labels in key-value pairs to clusters. This allows cluster developers or O\\\\\\&M engineers to classify and manage clusters in a more flexible manner. This also meets the requirements for monitoring, cost analysis, and tenant isolation. You can call the ModifyClusterTags operation to modify the labels of a cluster.
 *
 * @param request ModifyClusterTagsRequest
 * @return ModifyClusterTagsResponse
 */
async function modifyClusterTags(ClusterId: string, request: ModifyClusterTagsRequest): ModifyClusterTagsResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return modifyClusterTagsWithOptions(ClusterId, request, headers, runtime);
}

model ModifyNodePoolNodeConfigRequest {
  containerdConfig?: ContainerdConfig(name='containerd_config'),
  kubeletConfig?: KubeletConfig(name='kubelet_config', description='The kubelet configuration.'),
  osConfig?: {
    sysctl?: map[string]any(name='sysctl', description='Configuration for sysctl kernel parameters.'),
  }(name='os_config', description='The OS configuration.'),
  rollingPolicy?: {
    maxParallelism?: long(name='max_parallelism', description='The maximum number of unavailable nodes.', example='3'),
  }(name='rolling_policy', description='The rolling update configuration.'),
}

model ModifyNodePoolNodeConfigResponseBody = {
  nodepoolId?: string(name='nodepool_id', description='The node pool ID.', example='np737c3ac1ac684703b9e10673aa2c****'),
  requestId?: string(name='request_id', description='The request ID.', example='D7631D83-6E98-1949-B665-766A62xxxxxx'),
  taskId?: string(name='task_id', description='The task ID.', example='T-5fd211e924e1d00787xxxxxx'),
}

model ModifyNodePoolNodeConfigResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyNodePoolNodeConfigResponseBody(name='body'),
}

/**
 * @summary Modifies the configuration of a node pool, such as the kubelet configuration and node rolling update configuration. After you modify the node pool configuration, nodes are batch updated and the kubelet on each node is restarted. This may adversely affect the nodes and workloads. We recommend that you perform this operation during off-peak hours.
 *
 * @description >  Container Service for Kubernetes (ACK) allows you to modify the kubelet configuration of nodes in a node pool. After you modify the kubelet configuration, the new configuration immediately takes effect on existing nodes in the node pool and is automatically applied to newly added nodes.
 *
 * @param request ModifyNodePoolNodeConfigRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyNodePoolNodeConfigResponse
 */
async function modifyNodePoolNodeConfigWithOptions(ClusterId: string, NodepoolId: string, request: ModifyNodePoolNodeConfigRequest, headers: map[string]string, runtime: Util.RuntimeOptions): ModifyNodePoolNodeConfigResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.containerdConfig)) {
    body['containerd_config'] = request.containerdConfig;
  }
  if (!Util.isUnset(request.kubeletConfig)) {
    body['kubelet_config'] = request.kubeletConfig;
  }
  if (!Util.isUnset(request.osConfig)) {
    body['os_config'] = request.osConfig;
  }
  if (!Util.isUnset(request.rollingPolicy)) {
    body['rolling_policy'] = request.rollingPolicy;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ModifyNodePoolNodeConfig',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/clusters/${OpenApiUtil.getEncodeParam(ClusterId)}/nodepools/${OpenApiUtil.getEncodeParam(NodepoolId)}/node_config`,
    method = 'PUT',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Modifies the configuration of a node pool, such as the kubelet configuration and node rolling update configuration. After you modify the node pool configuration, nodes are batch updated and the kubelet on each node is restarted. This may adversely affect the nodes and workloads. We recommend that you perform this operation during off-peak hours.
 *
 * @description >  Container Service for Kubernetes (ACK) allows you to modify the kubelet configuration of nodes in a node pool. After you modify the kubelet configuration, the new configuration immediately takes effect on existing nodes in the node pool and is automatically applied to newly added nodes.
 *
 * @param request ModifyNodePoolNodeConfigRequest
 * @return ModifyNodePoolNodeConfigResponse
 */
async function modifyNodePoolNodeConfig(ClusterId: string, NodepoolId: string, request: ModifyNodePoolNodeConfigRequest): ModifyNodePoolNodeConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return modifyNodePoolNodeConfigWithOptions(ClusterId, NodepoolId, request, headers, runtime);
}

model ModifyPolicyInstanceRequest {
  action?: string(name='action', description='The action of the policy. Valid values:

*   `deny`: Deployments that match the policy are denied.
*   `warn`: Alerts are generated for deployments that match the policy.', example='deny'),
  instanceName?: string(name='instance_name', description='The ID of the policy instance.', example='allowed-repos-cbhhb'),
  namespaces?: [ string ](name='namespaces', description='The namespaces to which the policy is applied. The policy is applied to all namespaces if this parameter is left empty.'),
  parameters?: map[string]any(name='parameters', description='The parameters of the policy instance. For more information, see [Predefined security policies of ACK](https://help.aliyun.com/document_detail/359819.html).', example='"restrictedNamespaces": [ "test" ]'),
}

model ModifyPolicyInstanceResponseBody = {
  instances?: [ string ](name='instances', description='The list of policy instances that are updated.'),
}

model ModifyPolicyInstanceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyPolicyInstanceResponseBody(name='body'),
}

/**
 * @summary Updates a policy in a specific Container Service for Kubernetes (ACK) cluster. You can modify the action of the policy such as alerting or denying and namespaces to which the policy applies.
 *
 * @param request ModifyPolicyInstanceRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyPolicyInstanceResponse
 */
async function modifyPolicyInstanceWithOptions(clusterId: string, policyName: string, request: ModifyPolicyInstanceRequest, headers: map[string]string, runtime: Util.RuntimeOptions): ModifyPolicyInstanceResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.action)) {
    body['action'] = request.action;
  }
  if (!Util.isUnset(request.instanceName)) {
    body['instance_name'] = request.instanceName;
  }
  if (!Util.isUnset(request.namespaces)) {
    body['namespaces'] = request.namespaces;
  }
  if (!Util.isUnset(request.parameters)) {
    body['parameters'] = request.parameters;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ModifyPolicyInstance',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/clusters/${OpenApiUtil.getEncodeParam(clusterId)}/policies/${OpenApiUtil.getEncodeParam(policyName)}`,
    method = 'PUT',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Updates a policy in a specific Container Service for Kubernetes (ACK) cluster. You can modify the action of the policy such as alerting or denying and namespaces to which the policy applies.
 *
 * @param request ModifyPolicyInstanceRequest
 * @return ModifyPolicyInstanceResponse
 */
async function modifyPolicyInstance(clusterId: string, policyName: string, request: ModifyPolicyInstanceRequest): ModifyPolicyInstanceResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return modifyPolicyInstanceWithOptions(clusterId, policyName, request, headers, runtime);
}

model OpenAckServiceRequest {
  type?: string(name='type', description='The type of service that you want to activate. Valid values:

*   `propayasgo`: ACK clusters (including ACK managed clusters and ACK dedicated clusters), ACK Serverless clusters, and registered clusters.
*   `edgepayasgo`: ACK Edge clusters.', example='propayasgo'),
}

model OpenAckServiceResponseBody = {
  orderId?: string(name='order_id', description='The ID of the order.', example='2067*******0374'),
  requestId?: string(name='request_id', description='The request ID.', example='20758A-585D-4A41-A9B2-28DA8F4F534F'),
}

model OpenAckServiceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: OpenAckServiceResponseBody(name='body'),
}

/**
 * @summary When you use Container Service for Kubernetes (ACK) for the first time, you must activate ACK by using an Alibaba Cloud account or RAM user with the required permissions and complete ACK authorization.
 *
 * @description *   You can activate ACK by using Alibaba Cloud accounts.
 * *   To activate ACK by using RAM users, you need to grant the AdministratorAccess permission to the RAM users.
 *
 * @param request OpenAckServiceRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return OpenAckServiceResponse
 */
async function openAckServiceWithOptions(request: OpenAckServiceRequest, headers: map[string]string, runtime: Util.RuntimeOptions): OpenAckServiceResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.type)) {
    query['type'] = request.type;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'OpenAckService',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/service/open`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary When you use Container Service for Kubernetes (ACK) for the first time, you must activate ACK by using an Alibaba Cloud account or RAM user with the required permissions and complete ACK authorization.
 *
 * @description *   You can activate ACK by using Alibaba Cloud accounts.
 * *   To activate ACK by using RAM users, you need to grant the AdministratorAccess permission to the RAM users.
 *
 * @param request OpenAckServiceRequest
 * @return OpenAckServiceResponse
 */
async function openAckService(request: OpenAckServiceRequest): OpenAckServiceResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return openAckServiceWithOptions(request, headers, runtime);
}

model PauseClusterUpgradeResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
}

/**
 * @deprecated OpenAPI PauseClusterUpgrade is deprecated
 *
 * @summary You can call the PauseClusterUpgrade operation to pause the update of a Container Service for Kubernetes (ACK) cluster.
 *
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return PauseClusterUpgradeResponse
 */
// Deprecated
async function pauseClusterUpgradeWithOptions(ClusterId: string, headers: map[string]string, runtime: Util.RuntimeOptions): PauseClusterUpgradeResponse {
  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
  };
  var params = new OpenApi.Params{
    action = 'PauseClusterUpgrade',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/api/v2/clusters/${OpenApiUtil.getEncodeParam(ClusterId)}/upgrade/pause`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'none',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @deprecated OpenAPI PauseClusterUpgrade is deprecated
 *
 * @summary You can call the PauseClusterUpgrade operation to pause the update of a Container Service for Kubernetes (ACK) cluster.
 *
 * @return PauseClusterUpgradeResponse
 */
// Deprecated
async function pauseClusterUpgrade(ClusterId: string): PauseClusterUpgradeResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return pauseClusterUpgradeWithOptions(ClusterId, headers, runtime);
}

model PauseComponentUpgradeResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
}

/**
 * @deprecated OpenAPI PauseComponentUpgrade is deprecated
 *
 * @summary You can call the PauseComponentUpgrade operation to pause the update of a component.
 *
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return PauseComponentUpgradeResponse
 */
// Deprecated
async function pauseComponentUpgradeWithOptions(clusterid: string, componentid: string, headers: map[string]string, runtime: Util.RuntimeOptions): PauseComponentUpgradeResponse {
  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
  };
  var params = new OpenApi.Params{
    action = 'PauseComponentUpgrade',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/clusters/${OpenApiUtil.getEncodeParam(clusterid)}/components/${OpenApiUtil.getEncodeParam(componentid)}/pause`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'none',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @deprecated OpenAPI PauseComponentUpgrade is deprecated
 *
 * @summary You can call the PauseComponentUpgrade operation to pause the update of a component.
 *
 * @return PauseComponentUpgradeResponse
 */
// Deprecated
async function pauseComponentUpgrade(clusterid: string, componentid: string): PauseComponentUpgradeResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return pauseComponentUpgradeWithOptions(clusterid, componentid, headers, runtime);
}

model PauseTaskResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
}

/**
 * @summary Pauses an on-going task.
 *
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return PauseTaskResponse
 */
async function pauseTaskWithOptions(taskId: string, headers: map[string]string, runtime: Util.RuntimeOptions): PauseTaskResponse {
  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
  };
  var params = new OpenApi.Params{
    action = 'PauseTask',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/tasks/${OpenApiUtil.getEncodeParam(taskId)}/pause`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'none',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Pauses an on-going task.
 *
 * @return PauseTaskResponse
 */
async function pauseTask(taskId: string): PauseTaskResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return pauseTaskWithOptions(taskId, headers, runtime);
}

model RemoveClusterNodesRequest {
  drainNode?: boolean(name='drain_node', description='Specifies whether to evict all pods from the nodes that you want to remove.'),
  nodes?: [ string ](name='nodes', description='The list of nodes to be removed.

This parameter is required.'),
  releaseNode?: boolean(name='release_node', description='Specifies whether to release the Elastic Compute Service (ECS) instances when they are removed from the cluster.'),
}

model RemoveClusterNodesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
}

/**
 * @deprecated OpenAPI RemoveClusterNodes is deprecated
 *
 * @summary You can call the RemoveClusterNodes operation to remove nodes from a Container Service for Kubernetes (ACK) cluster.
 *
 * @description ****
 * *   When you remove a node, the pods that run on the node are migrated to other nodes. This may cause service interruptions. We recommend that you remove nodes during off-peak hours.
 * *   Unknown errors may occur when you remove nodes. Before you remove nodes, back up the data on the nodes.
 * *   Nodes remain in the Unschedulable state when they are being removed.
 * *   You can remove only worker nodes. You cannot remove master nodes.
 *
 * @param request RemoveClusterNodesRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return RemoveClusterNodesResponse
 */
// Deprecated
async function removeClusterNodesWithOptions(ClusterId: string, request: RemoveClusterNodesRequest, headers: map[string]string, runtime: Util.RuntimeOptions): RemoveClusterNodesResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.drainNode)) {
    body['drain_node'] = request.drainNode;
  }
  if (!Util.isUnset(request.nodes)) {
    body['nodes'] = request.nodes;
  }
  if (!Util.isUnset(request.releaseNode)) {
    body['release_node'] = request.releaseNode;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'RemoveClusterNodes',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/api/v2/clusters/${OpenApiUtil.getEncodeParam(ClusterId)}/nodes/remove`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'none',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @deprecated OpenAPI RemoveClusterNodes is deprecated
 *
 * @summary You can call the RemoveClusterNodes operation to remove nodes from a Container Service for Kubernetes (ACK) cluster.
 *
 * @description ****
 * *   When you remove a node, the pods that run on the node are migrated to other nodes. This may cause service interruptions. We recommend that you remove nodes during off-peak hours.
 * *   Unknown errors may occur when you remove nodes. Before you remove nodes, back up the data on the nodes.
 * *   Nodes remain in the Unschedulable state when they are being removed.
 * *   You can remove only worker nodes. You cannot remove master nodes.
 *
 * @param request RemoveClusterNodesRequest
 * @return RemoveClusterNodesResponse
 */
// Deprecated
async function removeClusterNodes(ClusterId: string, request: RemoveClusterNodesRequest): RemoveClusterNodesResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return removeClusterNodesWithOptions(ClusterId, request, headers, runtime);
}

model RemoveNodePoolNodesRequest {
  concurrency?: boolean(name='concurrency', description='Whether to remove concurrently.', example='false'),
  drainNode?: boolean(name='drain_node', description='Specifies whether to drain the nodes that you want to remove. Valid values:

*   true: drain the nodes that you want to remove.
*   false: do not drain the nodes that you want to remove.', example='true'),
  instanceIds?: [ string ](name='instance_ids', description='A list of instances that you want to remove.'),
  nodes?: [ string ](name='nodes', description='This parameter is deprecated.

A list of nodes that you want to remove.

>  This parameter is deprecated. Use instance_ids instead.', deprecated=true),
  releaseNode?: boolean(name='release_node', description='Specifies whether to release the nodes after they are removed. Valid values:

*   true: release the nodes after they are removed.
*   false: do not release the nodes after they are removed.', example='true'),
}

model RemoveNodePoolNodesShrinkRequest {
  concurrency?: boolean(name='concurrency', description='Whether to remove concurrently.', example='false'),
  drainNode?: boolean(name='drain_node', description='Specifies whether to drain the nodes that you want to remove. Valid values:

*   true: drain the nodes that you want to remove.
*   false: do not drain the nodes that you want to remove.', example='true'),
  instanceIdsShrink?: string(name='instance_ids', description='A list of instances that you want to remove.'),
  nodesShrink?: string(name='nodes', description='This parameter is deprecated.

A list of nodes that you want to remove.

>  This parameter is deprecated. Use instance_ids instead.', deprecated=true),
  releaseNode?: boolean(name='release_node', description='Specifies whether to release the nodes after they are removed. Valid values:

*   true: release the nodes after they are removed.
*   false: do not release the nodes after they are removed.', example='true'),
}

model RemoveNodePoolNodesResponseBody = {
  requestId?: string(name='request_id', description='The request ID.', example='A9891419-D125-4D89-AFCA-68846675E2F7'),
  taskId?: string(name='task_id', description='The task ID.', example='T-62a944794ee141074400****'),
}

model RemoveNodePoolNodesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: RemoveNodePoolNodesResponseBody(name='body'),
}

/**
 * @summary Removes nodes from a node pool.
 *
 * @description *   When you remove a node, the pods on the node are migrated to other nodes. This may cause service interruptions. We recommend that you remove nodes during off-peak hours.
 * *   The operation may have unexpected risks. Back up the data before you perform this operation.
 * *   Nodes remain in the Unschedulable state when they are being removed.
 * *   The system removes only worker nodes. It does not remove master nodes.
 * *   Even if you set the `release_node` parameter to `true`, subscription nodes are not released. You must release the subscription nodes in the [ECS console](https://ecs.console.aliyun.com/) after you remove the nodes.
 *
 * @param tmpReq RemoveNodePoolNodesRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return RemoveNodePoolNodesResponse
 */
async function removeNodePoolNodesWithOptions(ClusterId: string, NodepoolId: string, tmpReq: RemoveNodePoolNodesRequest, headers: map[string]string, runtime: Util.RuntimeOptions): RemoveNodePoolNodesResponse {
  Util.validateModel(tmpReq);
  var request = new RemoveNodePoolNodesShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.instanceIds)) {
    request.instanceIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.instanceIds, 'instance_ids', 'json');
  }
  if (!Util.isUnset(tmpReq.nodes)) {
    request.nodesShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.nodes, 'nodes', 'json');
  }
  var query : map[string]any = {};
  if (!Util.isUnset(request.concurrency)) {
    query['concurrency'] = request.concurrency;
  }
  if (!Util.isUnset(request.drainNode)) {
    query['drain_node'] = request.drainNode;
  }
  if (!Util.isUnset(request.instanceIdsShrink)) {
    query['instance_ids'] = request.instanceIdsShrink;
  }
  if (!Util.isUnset(request.nodesShrink)) {
    query['nodes'] = request.nodesShrink;
  }
  if (!Util.isUnset(request.releaseNode)) {
    query['release_node'] = request.releaseNode;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'RemoveNodePoolNodes',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/clusters/${OpenApiUtil.getEncodeParam(ClusterId)}/nodepools/${OpenApiUtil.getEncodeParam(NodepoolId)}/nodes`,
    method = 'DELETE',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Removes nodes from a node pool.
 *
 * @description *   When you remove a node, the pods on the node are migrated to other nodes. This may cause service interruptions. We recommend that you remove nodes during off-peak hours.
 * *   The operation may have unexpected risks. Back up the data before you perform this operation.
 * *   Nodes remain in the Unschedulable state when they are being removed.
 * *   The system removes only worker nodes. It does not remove master nodes.
 * *   Even if you set the `release_node` parameter to `true`, subscription nodes are not released. You must release the subscription nodes in the [ECS console](https://ecs.console.aliyun.com/) after you remove the nodes.
 *
 * @param request RemoveNodePoolNodesRequest
 * @return RemoveNodePoolNodesResponse
 */
async function removeNodePoolNodes(ClusterId: string, NodepoolId: string, request: RemoveNodePoolNodesRequest): RemoveNodePoolNodesResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return removeNodePoolNodesWithOptions(ClusterId, NodepoolId, request, headers, runtime);
}

model RepairClusterNodePoolRequest {
  autoRestart?: boolean(name='auto_restart', description='Specifies whether to enable automatic instance restart.

**

**Warning** This parameter is deprecated. Any configured values will be ignored.', example='true', deprecated=true),
  nodes?: [ string ](name='nodes', description='The list of nodes. If not specified, all nodes in the node pool are selected.'),
  operations?: [ 
    {
      args?: [ string ](name='args', description='The parameters of a repair operation.'),
      operationId?: string(name='operation_id', description='The ID of a repair operation.', example='remove.containerdContainer'),
    }
  ](name='operations', description='The list of repair operations to execute. If not specified, all repair operations are executed. Typically, you do not need to specify this parameter.'),
}

model RepairClusterNodePoolResponseBody = {
  requestId?: string(name='request_id', description='The request ID.', example='db82195b-75a8-40e5-9be4-16f1829dc624'),
  taskId?: string(name='task_id', description='The ID of the task.', example='T-613b19bbd160ad4928000001'),
}

model RepairClusterNodePoolResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: RepairClusterNodePoolResponseBody(name='body'),
}

/**
 * @summary Repairs a node pool.
 *
 * @param request RepairClusterNodePoolRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return RepairClusterNodePoolResponse
 */
async function repairClusterNodePoolWithOptions(clusterId: string, nodepoolId: string, request: RepairClusterNodePoolRequest, headers: map[string]string, runtime: Util.RuntimeOptions): RepairClusterNodePoolResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.autoRestart)) {
    body['auto_restart'] = request.autoRestart;
  }
  if (!Util.isUnset(request.nodes)) {
    body['nodes'] = request.nodes;
  }
  if (!Util.isUnset(request.operations)) {
    body['operations'] = request.operations;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'RepairClusterNodePool',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/clusters/${OpenApiUtil.getEncodeParam(clusterId)}/nodepools/${OpenApiUtil.getEncodeParam(nodepoolId)}/repair`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Repairs a node pool.
 *
 * @param request RepairClusterNodePoolRequest
 * @return RepairClusterNodePoolResponse
 */
async function repairClusterNodePool(clusterId: string, nodepoolId: string, request: RepairClusterNodePoolRequest): RepairClusterNodePoolResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return repairClusterNodePoolWithOptions(clusterId, nodepoolId, request, headers, runtime);
}

model ResumeComponentUpgradeResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
}

/**
 * @deprecated OpenAPI ResumeComponentUpgrade is deprecated
 *
 * @summary You can call the ResumeComponentUpgrade operation to resume the update of a component.
 *
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return ResumeComponentUpgradeResponse
 */
// Deprecated
async function resumeComponentUpgradeWithOptions(clusterid: string, componentid: string, headers: map[string]string, runtime: Util.RuntimeOptions): ResumeComponentUpgradeResponse {
  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
  };
  var params = new OpenApi.Params{
    action = 'ResumeComponentUpgrade',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/clusters/${OpenApiUtil.getEncodeParam(clusterid)}/components/${OpenApiUtil.getEncodeParam(componentid)}/resume`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'none',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @deprecated OpenAPI ResumeComponentUpgrade is deprecated
 *
 * @summary You can call the ResumeComponentUpgrade operation to resume the update of a component.
 *
 * @return ResumeComponentUpgradeResponse
 */
// Deprecated
async function resumeComponentUpgrade(clusterid: string, componentid: string): ResumeComponentUpgradeResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return resumeComponentUpgradeWithOptions(clusterid, componentid, headers, runtime);
}

model ResumeTaskResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
}

/**
 * @summary Resumes a task.
 *
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return ResumeTaskResponse
 */
async function resumeTaskWithOptions(taskId: string, headers: map[string]string, runtime: Util.RuntimeOptions): ResumeTaskResponse {
  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
  };
  var params = new OpenApi.Params{
    action = 'ResumeTask',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/tasks/${OpenApiUtil.getEncodeParam(taskId)}/resume`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'none',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Resumes a task.
 *
 * @return ResumeTaskResponse
 */
async function resumeTask(taskId: string): ResumeTaskResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return resumeTaskWithOptions(taskId, headers, runtime);
}

model ResumeUpgradeClusterResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
}

/**
 * @deprecated OpenAPI ResumeUpgradeCluster is deprecated
 *
 * @summary You can call the ResumeUpgradeCluster operation to resume the update of a cluster by cluster ID.
 *
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return ResumeUpgradeClusterResponse
 */
// Deprecated
async function resumeUpgradeClusterWithOptions(ClusterId: string, headers: map[string]string, runtime: Util.RuntimeOptions): ResumeUpgradeClusterResponse {
  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
  };
  var params = new OpenApi.Params{
    action = 'ResumeUpgradeCluster',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/api/v2/clusters/${OpenApiUtil.getEncodeParam(ClusterId)}/upgrade/resume`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'none',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @deprecated OpenAPI ResumeUpgradeCluster is deprecated
 *
 * @summary You can call the ResumeUpgradeCluster operation to resume the update of a cluster by cluster ID.
 *
 * @return ResumeUpgradeClusterResponse
 */
// Deprecated
async function resumeUpgradeCluster(ClusterId: string): ResumeUpgradeClusterResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return resumeUpgradeClusterWithOptions(ClusterId, headers, runtime);
}

model RevokeK8sClusterKubeConfigResponseBody = {
}

model RevokeK8sClusterKubeConfigResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: RevokeK8sClusterKubeConfigResponseBody(name='body'),
}

/**
 * @summary You can call the RevokeK8sClusterKubeConfig operation to revoke the kubeconfig file of a cluster that belongs to the current Alibaba Cloud account or RAM user. After the kubeconfig file is revoked, the cluster generates a new kubeconfig file, and the original kubeconfig file becomes invalid.
 *
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return RevokeK8sClusterKubeConfigResponse
 */
async function revokeK8sClusterKubeConfigWithOptions(ClusterId: string, headers: map[string]string, runtime: Util.RuntimeOptions): RevokeK8sClusterKubeConfigResponse {
  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
  };
  var params = new OpenApi.Params{
    action = 'RevokeK8sClusterKubeConfig',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/k8s/${OpenApiUtil.getEncodeParam(ClusterId)}/certs`,
    method = 'DELETE',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary You can call the RevokeK8sClusterKubeConfig operation to revoke the kubeconfig file of a cluster that belongs to the current Alibaba Cloud account or RAM user. After the kubeconfig file is revoked, the cluster generates a new kubeconfig file, and the original kubeconfig file becomes invalid.
 *
 * @return RevokeK8sClusterKubeConfigResponse
 */
async function revokeK8sClusterKubeConfig(ClusterId: string): RevokeK8sClusterKubeConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return revokeK8sClusterKubeConfigWithOptions(ClusterId, headers, runtime);
}

model RunClusterCheckRequest {
  options?: map[string]string(name='options', description='The cluster check items.'),
  target?: string(name='target', description='The target to be checked.', example='np1f6779297c4444a3a1cdd29be8e5****'),
  type?: string(name='type', description='The check method.

This parameter is required.', example='ClusterUpgrade'),
}

model RunClusterCheckResponseBody = {
  checkId?: string(name='check_id', description='The ID of the cluster check task.', example='1697100584236600453-ce0da5a1d627e4e9e9f96cae8ad07****-clustercheck-lboto'),
  requestId?: string(name='request_id', description='The ID of the request.', example='F04DF81D-5C12-1524-B36A-86E02526****'),
}

model RunClusterCheckResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: RunClusterCheckResponseBody(name='body'),
}

/**
 * @summary Container Intelligence Service (CIS) provides a variety of cluster check capabilities to allow you to perform cluster update check, cluster migration check, component installation check, component update check, and node pool check. A precheck is automatically triggered before an update, migration, or installation is performed. You can perform changes only if the cluster passes the precheck. You can also manually call the RunClusterCheck operation to initiate cluster checks. We recommend that you periodically check and maintain your cluster to mitigate potential risks.
 *
 * @param request RunClusterCheckRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return RunClusterCheckResponse
 */
async function runClusterCheckWithOptions(clusterId: string, request: RunClusterCheckRequest, headers: map[string]string, runtime: Util.RuntimeOptions): RunClusterCheckResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.options)) {
    body['options'] = request.options;
  }
  if (!Util.isUnset(request.target)) {
    body['target'] = request.target;
  }
  if (!Util.isUnset(request.type)) {
    body['type'] = request.type;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'RunClusterCheck',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/clusters/${OpenApiUtil.getEncodeParam(clusterId)}/checks`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Container Intelligence Service (CIS) provides a variety of cluster check capabilities to allow you to perform cluster update check, cluster migration check, component installation check, component update check, and node pool check. A precheck is automatically triggered before an update, migration, or installation is performed. You can perform changes only if the cluster passes the precheck. You can also manually call the RunClusterCheck operation to initiate cluster checks. We recommend that you periodically check and maintain your cluster to mitigate potential risks.
 *
 * @param request RunClusterCheckRequest
 * @return RunClusterCheckResponse
 */
async function runClusterCheck(clusterId: string, request: RunClusterCheckRequest): RunClusterCheckResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return runClusterCheckWithOptions(clusterId, request, headers, runtime);
}

model ScaleClusterRequest {
  cloudMonitorFlags?: boolean(name='cloud_monitor_flags'),
  count?: long(name='count'),
  cpuPolicy?: string(name='cpu_policy'),
  disableRollback?: boolean(name='disable_rollback'),
  keyPair?: string(name='key_pair'),
  loginPassword?: string(name='login_password'),
  tags?: [ 
    {
      key?: string(name='key'),
    }
  ](name='tags'),
  taints?: [ 
    {
      effect?: string(name='effect'),
      key?: string(name='key'),
      value?: string(name='value'),
    }
  ](name='taints'),
  vswitchIds?: [ string ](name='vswitch_ids'),
  workerAutoRenew?: boolean(name='worker_auto_renew'),
  workerAutoRenewPeriod?: long(name='worker_auto_renew_period'),
  workerDataDisk?: boolean(name='worker_data_disk'),
  workerDataDisks?: [ 
    {
      category?: string(name='category'),
      encrypted?: string(name='encrypted'),
      size?: string(name='size'),
    }
  ](name='worker_data_disks'),
  workerInstanceChargeType?: string(name='worker_instance_charge_type'),
  workerInstanceTypes?: [ string ](name='worker_instance_types'),
  workerPeriod?: long(name='worker_period'),
  workerPeriodUnit?: string(name='worker_period_unit'),
  workerSystemDiskCategory?: string(name='worker_system_disk_category'),
  workerSystemDiskSize?: long(name='worker_system_disk_size'),
}

model ScaleClusterResponseBody = {
  clusterId?: string(name='cluster_id'),
  requestId?: string(name='request_id'),
  taskId?: string(name='task_id'),
}

model ScaleClusterResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ScaleClusterResponseBody(name='body'),
}

/**
 * @deprecated OpenAPI ScaleCluster is deprecated
 *
 * @summary 扩容Kubernetes集群
 *
 * @param request ScaleClusterRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return ScaleClusterResponse
 */
// Deprecated
async function scaleClusterWithOptions(ClusterId: string, request: ScaleClusterRequest, headers: map[string]string, runtime: Util.RuntimeOptions): ScaleClusterResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.cloudMonitorFlags)) {
    body['cloud_monitor_flags'] = request.cloudMonitorFlags;
  }
  if (!Util.isUnset(request.count)) {
    body['count'] = request.count;
  }
  if (!Util.isUnset(request.cpuPolicy)) {
    body['cpu_policy'] = request.cpuPolicy;
  }
  if (!Util.isUnset(request.disableRollback)) {
    body['disable_rollback'] = request.disableRollback;
  }
  if (!Util.isUnset(request.keyPair)) {
    body['key_pair'] = request.keyPair;
  }
  if (!Util.isUnset(request.loginPassword)) {
    body['login_password'] = request.loginPassword;
  }
  if (!Util.isUnset(request.tags)) {
    body['tags'] = request.tags;
  }
  if (!Util.isUnset(request.taints)) {
    body['taints'] = request.taints;
  }
  if (!Util.isUnset(request.vswitchIds)) {
    body['vswitch_ids'] = request.vswitchIds;
  }
  if (!Util.isUnset(request.workerAutoRenew)) {
    body['worker_auto_renew'] = request.workerAutoRenew;
  }
  if (!Util.isUnset(request.workerAutoRenewPeriod)) {
    body['worker_auto_renew_period'] = request.workerAutoRenewPeriod;
  }
  if (!Util.isUnset(request.workerDataDisk)) {
    body['worker_data_disk'] = request.workerDataDisk;
  }
  if (!Util.isUnset(request.workerDataDisks)) {
    body['worker_data_disks'] = request.workerDataDisks;
  }
  if (!Util.isUnset(request.workerInstanceChargeType)) {
    body['worker_instance_charge_type'] = request.workerInstanceChargeType;
  }
  if (!Util.isUnset(request.workerInstanceTypes)) {
    body['worker_instance_types'] = request.workerInstanceTypes;
  }
  if (!Util.isUnset(request.workerPeriod)) {
    body['worker_period'] = request.workerPeriod;
  }
  if (!Util.isUnset(request.workerPeriodUnit)) {
    body['worker_period_unit'] = request.workerPeriodUnit;
  }
  if (!Util.isUnset(request.workerSystemDiskCategory)) {
    body['worker_system_disk_category'] = request.workerSystemDiskCategory;
  }
  if (!Util.isUnset(request.workerSystemDiskSize)) {
    body['worker_system_disk_size'] = request.workerSystemDiskSize;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ScaleCluster',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/clusters/${OpenApiUtil.getEncodeParam(ClusterId)}`,
    method = 'PUT',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @deprecated OpenAPI ScaleCluster is deprecated
 *
 * @summary 扩容Kubernetes集群
 *
 * @param request ScaleClusterRequest
 * @return ScaleClusterResponse
 */
// Deprecated
async function scaleCluster(ClusterId: string, request: ScaleClusterRequest): ScaleClusterResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return scaleClusterWithOptions(ClusterId, request, headers, runtime);
}

model ScaleClusterNodePoolRequest {
  count?: long(name='count', description='The number of worker nodes that you want to add. For example, the current node pool contains two nodes. After the two node is scaled out, the node pool contains four nodes. Due to the limit of the node quota, you can add at most 500 nodes in each request.', example='2'),
}

model ScaleClusterNodePoolResponseBody = {
  taskId?: string(name='task_id', description='The task ID.', example='T-5faa48fb31b6b8078d00****'),
}

model ScaleClusterNodePoolResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ScaleClusterNodePoolResponseBody(name='body'),
}

/**
 * @summary Scales out a node pool.
 *
 * @param request ScaleClusterNodePoolRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return ScaleClusterNodePoolResponse
 */
async function scaleClusterNodePoolWithOptions(ClusterId: string, NodepoolId: string, request: ScaleClusterNodePoolRequest, headers: map[string]string, runtime: Util.RuntimeOptions): ScaleClusterNodePoolResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.count)) {
    body['count'] = request.count;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ScaleClusterNodePool',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/clusters/${OpenApiUtil.getEncodeParam(ClusterId)}/nodepools/${OpenApiUtil.getEncodeParam(NodepoolId)}`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Scales out a node pool.
 *
 * @param request ScaleClusterNodePoolRequest
 * @return ScaleClusterNodePoolResponse
 */
async function scaleClusterNodePool(ClusterId: string, NodepoolId: string, request: ScaleClusterNodePoolRequest): ScaleClusterNodePoolResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return scaleClusterNodePoolWithOptions(ClusterId, NodepoolId, request, headers, runtime);
}

model ScaleOutClusterRequest {
  cloudMonitorFlags?: boolean(name='cloud_monitor_flags', description='Specifies whether to install the CloudMonitor agent. Valid values:

*   `true`: installs the CloudMonitor agent.
*   `false`: does not install the CloudMonitor agent.

Default value: `false`.', example='true'),
  count?: long(name='count', description='The number of worker nodes that you want to add.

This parameter is required.', example='3'),
  cpuPolicy?: string(name='cpu_policy', description='The CPU management policy of nodes in the node pool. The following policies are supported if the Kubernetes version of the cluster is 1.12.6 or later:

*   `static`: allows pods with specific resource characteristics on the node to be granted with enhanced CPU affinity and exclusivity.
*   `none`: specifies that the default CPU affinity is used.

Default value: `none`.', example='none'),
  imageId?: string(name='image_id', description='Specifies a custom image for nodes. By default, the image provided by ACK is used. You can select a custom image to replace the default image. For more information, see [Custom images](https://help.aliyun.com/document_detail/146647.html).', example='m-bp16z7xko3vvv8gt****'),
  keyPair?: string(name='key_pair', description='The name of the key pair. You must configure this parameter or the `login_password` parameter.

This parameter is required.', example='secrity-key'),
  loginPassword?: string(name='login_password', description='The password for SSH logon. You must configure this parameter or the `key_pair` parameter. The password must be 8 to 30 characters in length, and must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters.

This parameter is required.', example='Hello@1234'),
  rdsInstances?: [ string ](name='rds_instances', description='The ApsaraDB RDS instances. If you specify a list of ApsaraDB RDS instances, ECS instances in the cluster are automatically added to the whitelist of the ApsaraDB RDS instances.'),
  runtime?: Runtime(name='runtime', description='The container runtime.'),
  tags?: [
    Tag
  ](name='tags', description='The labels that you want to add to the node. When you add labels to a node, the following rules apply:

*   A label is a case-sensitive key-value pair. You can add up to 20 labels.
*   The key must be unique and cannot exceed 64 characters in length. The value can be empty and cannot exceed 128 characters in length. Keys and values cannot start with aliyun, acs:, https://, or http://. For more information, see [Labels and Selectors](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#syntax-and-character-set).'),
  taints?: [
    Taint
  ](name='taints', description='The taints that you want to add to nodes. Taints can be used together with tolerations to avoid scheduling pods to specified nodes. For more information, see [taint-and-toleration](https://kubernetes.io/zh/docs/concepts/scheduling-eviction/taint-and-toleration/).'),
  userData?: string(name='user_data', description='The user-defined data of the node pool. For more information, see [Generate user-defined data](https://help.aliyun.com/document_detail/49121.html).', example='IyEvdXNyL2Jpbi9iYXNoCmVjaG8gIkhlbGxvIEFD****'),
  vswitchIds?: [ string ](name='vswitch_ids', description='The vSwitch IDs. You can select one to three vSwitches when you create a cluster. To ensure the high availability of the cluster, we recommend that you select vSwitches in different zones.

This parameter is required.'),
  workerAutoRenew?: boolean(name='worker_auto_renew', description='Specifies whether to enable auto-renewal for worker nodes. This parameter takes effect and is required only if `worker_instance_charge_type` is set to `PrePaid`. Valid values:

*   `true`: enables auto-renewal.
*   `false`: does not enable auto-renewal.

Default value: `true`', example='true'),
  workerAutoRenewPeriod?: long(name='worker_auto_renew_period', description='The auto-renewal duration of worker nodes. This parameter takes effect and is required only if the subscription billing method is selected for worker nodes.

Valid values: 1, 2, 3, 6, and 12.

Default value: `1`.', example='6'),
  workerDataDisks?: [ 
    {
      autoSnapshotPolicyId?: string(name='auto_snapshot_policy_id', description='The ID of the automatic snapshot policy. The system performs automatic backup for a cloud disk based on the specified automatic snapshot policy.

By default, this parameter is left empty, which indicates that automatic backup is disabled.', example='sp-bp14yziiuvu3s6jn****'),
      category?: string(name='category', description='The type of the data disk.', example='cloud_essd'),
      encrypted?: string(name='encrypted', description='Specifies whether to encrypt the data disks. Valid values:

*   `true`: encrypts the data disk.
*   `false`: does not encrypt the data disk.

Default value: `false`.', example='true'),
      size?: string(name='size', description='The size of the data disk. Valid values: 40 to 32767.', example='120'),
    }
  ](name='worker_data_disks', description='The configurations of the data disks that you want to mount to worker nodes. The configurations include the disk type and disk size.'),
  workerInstanceChargeType?: string(name='worker_instance_charge_type', description='The billing method of worker nodes. Valid values:

*   `PrePaid`: subscription.
*   `PostPaid`: pay-as-you-go.

Default value: `PostPaid`.', example='PrePaid'),
  workerInstanceTypes?: [ string ](name='worker_instance_types', description='The instance configurations of worker nodes.

This parameter is required.'),
  workerPeriod?: long(name='worker_period', description='The subscription duration of worker nodes. This parameter takes effect and is required only if `worker_instance_charge_type` is set to `PrePaid`.

Valid values: 1, 2, 3, 6, 12, 24, 36, 48, and 60.

Default value: 1.', example='1'),
  workerPeriodUnit?: string(name='worker_period_unit', description='The billing cycle of worker nodes. This parameter is required only if worker_instance_charge_type is set to `PrePaid`.

Set the value to `Month`.', example='Month'),
  workerSystemDiskCategory?: string(name='worker_system_disk_category', description='The system disk category of worker nodes. Valid values:

*   `cloud_efficiency`: ultra disk.
*   `cloud_ssd`: standard SSD.
*   `cloud_essd`: Enterprise SSD (ESSD).

Default value: `cloud_ssd`.

This parameter is required.', example='cloud_efficiency'),
  workerSystemDiskSize?: long(name='worker_system_disk_size', description='The system disk size of worker nodes. Unit: GiB.

Valid values: 40 to 500.

Default value: `120`.

This parameter is required.', example='120'),
}

model ScaleOutClusterResponseBody = {
  clusterId?: string(name='cluster_id', description='The cluster ID.', example='c82e6987e2961451182edacd74faf****'),
  requestId?: string(name='request_id', description='The request ID.', example='687C5BAA-D103-4993-884B-C35E4314A1E1'),
  taskId?: string(name='task_id', description='The task ID.', example='T-5a54309c80282e39ea00002f'),
}

model ScaleOutClusterResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ScaleOutClusterResponseBody(name='body'),
}

/**
 * @summary You can call the ScaleOutCluster operation to scale out a cluster by cluster ID.
 *
 * @description **
 * ****The ScaleOutCluster API operation is phased out. You must call the node pool-related API operations to manage nodes. If you want to add worker nodes to a Container Service for Kubernetes (ACK) cluster, call the ScaleClusterNodePool API operation. For more information, see [ScaleClusterNodePool](https://help.aliyun.com/document_detail/184928.html).
 *
 * @param request ScaleOutClusterRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return ScaleOutClusterResponse
 */
async function scaleOutClusterWithOptions(ClusterId: string, request: ScaleOutClusterRequest, headers: map[string]string, runtime: Util.RuntimeOptions): ScaleOutClusterResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.cloudMonitorFlags)) {
    body['cloud_monitor_flags'] = request.cloudMonitorFlags;
  }
  if (!Util.isUnset(request.count)) {
    body['count'] = request.count;
  }
  if (!Util.isUnset(request.cpuPolicy)) {
    body['cpu_policy'] = request.cpuPolicy;
  }
  if (!Util.isUnset(request.imageId)) {
    body['image_id'] = request.imageId;
  }
  if (!Util.isUnset(request.keyPair)) {
    body['key_pair'] = request.keyPair;
  }
  if (!Util.isUnset(request.loginPassword)) {
    body['login_password'] = request.loginPassword;
  }
  if (!Util.isUnset(request.rdsInstances)) {
    body['rds_instances'] = request.rdsInstances;
  }
  if (!Util.isUnset(request.runtime)) {
    body['runtime'] = request.runtime;
  }
  if (!Util.isUnset(request.tags)) {
    body['tags'] = request.tags;
  }
  if (!Util.isUnset(request.taints)) {
    body['taints'] = request.taints;
  }
  if (!Util.isUnset(request.userData)) {
    body['user_data'] = request.userData;
  }
  if (!Util.isUnset(request.vswitchIds)) {
    body['vswitch_ids'] = request.vswitchIds;
  }
  if (!Util.isUnset(request.workerAutoRenew)) {
    body['worker_auto_renew'] = request.workerAutoRenew;
  }
  if (!Util.isUnset(request.workerAutoRenewPeriod)) {
    body['worker_auto_renew_period'] = request.workerAutoRenewPeriod;
  }
  if (!Util.isUnset(request.workerDataDisks)) {
    body['worker_data_disks'] = request.workerDataDisks;
  }
  if (!Util.isUnset(request.workerInstanceChargeType)) {
    body['worker_instance_charge_type'] = request.workerInstanceChargeType;
  }
  if (!Util.isUnset(request.workerInstanceTypes)) {
    body['worker_instance_types'] = request.workerInstanceTypes;
  }
  if (!Util.isUnset(request.workerPeriod)) {
    body['worker_period'] = request.workerPeriod;
  }
  if (!Util.isUnset(request.workerPeriodUnit)) {
    body['worker_period_unit'] = request.workerPeriodUnit;
  }
  if (!Util.isUnset(request.workerSystemDiskCategory)) {
    body['worker_system_disk_category'] = request.workerSystemDiskCategory;
  }
  if (!Util.isUnset(request.workerSystemDiskSize)) {
    body['worker_system_disk_size'] = request.workerSystemDiskSize;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ScaleOutCluster',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/api/v2/clusters/${OpenApiUtil.getEncodeParam(ClusterId)}`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary You can call the ScaleOutCluster operation to scale out a cluster by cluster ID.
 *
 * @description **
 * ****The ScaleOutCluster API operation is phased out. You must call the node pool-related API operations to manage nodes. If you want to add worker nodes to a Container Service for Kubernetes (ACK) cluster, call the ScaleClusterNodePool API operation. For more information, see [ScaleClusterNodePool](https://help.aliyun.com/document_detail/184928.html).
 *
 * @param request ScaleOutClusterRequest
 * @return ScaleOutClusterResponse
 */
async function scaleOutCluster(ClusterId: string, request: ScaleOutClusterRequest): ScaleOutClusterResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return scaleOutClusterWithOptions(ClusterId, request, headers, runtime);
}

model ScanClusterVulsResponseBody = {
  requestId?: string(name='request_id', description='Request ID.', example='687C5BAA-D103-4993-884B-C35E4314A1E1'),
  taskId?: string(name='task_id', description='Task ID.', example='T-xascadasd*****'),
}

model ScanClusterVulsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ScanClusterVulsResponseBody(name='body'),
}

/**
 * @summary Scans for vulnerabilities in a Container Service for Kubernetes (ACK) cluster, including workload vulnerabilities, third-party software vulnerabilities, CVE vulnerabilities, WebCMS vulnerabilities, and Windows vulnerabilities. We recommend that you scan your cluster on a regular basis to ensure cluster security.
 *
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return ScanClusterVulsResponse
 */
async function scanClusterVulsWithOptions(clusterId: string, headers: map[string]string, runtime: Util.RuntimeOptions): ScanClusterVulsResponse {
  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
  };
  var params = new OpenApi.Params{
    action = 'ScanClusterVuls',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/clusters/${OpenApiUtil.getEncodeParam(clusterId)}/vuls/scan`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Scans for vulnerabilities in a Container Service for Kubernetes (ACK) cluster, including workload vulnerabilities, third-party software vulnerabilities, CVE vulnerabilities, WebCMS vulnerabilities, and Windows vulnerabilities. We recommend that you scan your cluster on a regular basis to ensure cluster security.
 *
 * @return ScanClusterVulsResponse
 */
async function scanClusterVuls(clusterId: string): ScanClusterVulsResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return scanClusterVulsWithOptions(clusterId, headers, runtime);
}

model StartAlertRequest {
  alertRuleGroupName?: string(name='alert_rule_group_name', description='The name of the alert rule group.', example='sample'),
  alertRuleName?: string(name='alert_rule_name', description='The name of the alert rule.', example='sample'),
}

model StartAlertResponseBody = {
  msg?: string(name='msg', description='The message returned.', example='success'),
  status?: boolean(name='status', description='The status.', example='true'),
}

model StartAlertResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: StartAlertResponseBody(name='body'),
}

/**
 * @summary Activates the specified alert rule(s).
 *
 * @param request StartAlertRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return StartAlertResponse
 */
async function startAlertWithOptions(ClusterId: string, request: StartAlertRequest, headers: map[string]string, runtime: Util.RuntimeOptions): StartAlertResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.alertRuleGroupName)) {
    body['alert_rule_group_name'] = request.alertRuleGroupName;
  }
  if (!Util.isUnset(request.alertRuleName)) {
    body['alert_rule_name'] = request.alertRuleName;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'StartAlert',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/alert/${OpenApiUtil.getEncodeParam(ClusterId)}/alert_rule/start`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Activates the specified alert rule(s).
 *
 * @param request StartAlertRequest
 * @return StartAlertResponse
 */
async function startAlert(ClusterId: string, request: StartAlertRequest): StartAlertResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return startAlertWithOptions(ClusterId, request, headers, runtime);
}

model StopAlertRequest {
  alertRuleGroupName?: string(name='alert_rule_group_name', description='The name of the alert rule group.', example='sample'),
  alertRuleName?: string(name='alert_rule_name', description='The name of the alert rule.', example='sample'),
}

model StopAlertResponseBody = {
  msg?: string(name='msg', description='The error message returned if the call fails.', example='Success'),
  status?: boolean(name='status', description='The operation result. Valid values:

*   True: The operation is successful.
*   False: The operation failed.', example='True'),
}

model StopAlertResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: StopAlertResponseBody(name='body'),
}

/**
 * @summary You can call the StopAlert operation to disable an alert rule or an alert rule set in the alert center of Container Service for Kubernetes (ACK).
 *
 * @param request StopAlertRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return StopAlertResponse
 */
async function stopAlertWithOptions(ClusterId: string, request: StopAlertRequest, headers: map[string]string, runtime: Util.RuntimeOptions): StopAlertResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.alertRuleGroupName)) {
    body['alert_rule_group_name'] = request.alertRuleGroupName;
  }
  if (!Util.isUnset(request.alertRuleName)) {
    body['alert_rule_name'] = request.alertRuleName;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'StopAlert',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/alert/${OpenApiUtil.getEncodeParam(ClusterId)}/alert_rule/stop`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary You can call the StopAlert operation to disable an alert rule or an alert rule set in the alert center of Container Service for Kubernetes (ACK).
 *
 * @param request StopAlertRequest
 * @return StopAlertResponse
 */
async function stopAlert(ClusterId: string, request: StopAlertRequest): StopAlertResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return stopAlertWithOptions(ClusterId, request, headers, runtime);
}

model SyncClusterNodePoolResponseBody = {
  requestId?: string(name='RequestId', description='The request ID.', example='2D69A58F-345C-4FDE-88E4-BF51894XXXXX'),
}

model SyncClusterNodePoolResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SyncClusterNodePoolResponseBody(name='body'),
}

/**
 * @summary Synchronizes the information about a node pool, including the metadata and node information of the node pool.
 *
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return SyncClusterNodePoolResponse
 */
async function syncClusterNodePoolWithOptions(ClusterId: string, headers: map[string]string, runtime: Util.RuntimeOptions): SyncClusterNodePoolResponse {
  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
  };
  var params = new OpenApi.Params{
    action = 'SyncClusterNodePool',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/clusters/${OpenApiUtil.getEncodeParam(ClusterId)}/sync_nodepools`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Synchronizes the information about a node pool, including the metadata and node information of the node pool.
 *
 * @return SyncClusterNodePoolResponse
 */
async function syncClusterNodePool(ClusterId: string): SyncClusterNodePoolResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return syncClusterNodePoolWithOptions(ClusterId, headers, runtime);
}

model TagResourcesRequest {
  regionId?: string(name='region_id', description='The ID of the region in which the resource resides.

This parameter is required.', example='cn-hangzhou'),
  resourceIds?: [ string ](name='resource_ids', description='The list of resource IDs.

This parameter is required.'),
  resourceType?: string(name='resource_type', description='The type of resources that you want to label. Set the value to `CLUSTER`.

This parameter is required.', example='CLUSTER'),
  tags?: [
    Tag
  ](name='tags', description='The tags that you want to add to the resources in key-value pairs. You can add up to 20 key-value pairs. Note:

*   The values cannot be empty strings. A value must be 1 to 128 characters in length.
*   A key or value cannot start with `aliyun` or `acs:`.
*   A key or value cannot contain `http://` or `https://`.

This parameter is required.'),
}

model TagResourcesResponseBody = {
  requestId?: string(name='RequestId', description='The request ID.', example='2D69A58F-345C-4FDE-88E4-BF51894XXXXX'),
}

model TagResourcesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: TagResourcesResponseBody(name='body'),
}

/**
 * @summary You can add labels in key-value pairs to clusters. This allows cluster developers or O\\&M engineers to classify and manage clusters in a more flexible manner. This also meets the requirements for monitoring, cost analysis, and tenant isolation. You can call the TagResources operation to add labels to a cluster.
 *
 * @param request TagResourcesRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return TagResourcesResponse
 */
async function tagResourcesWithOptions(request: TagResourcesRequest, headers: map[string]string, runtime: Util.RuntimeOptions): TagResourcesResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.regionId)) {
    body['region_id'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceIds)) {
    body['resource_ids'] = request.resourceIds;
  }
  if (!Util.isUnset(request.resourceType)) {
    body['resource_type'] = request.resourceType;
  }
  if (!Util.isUnset(request.tags)) {
    body['tags'] = request.tags;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'TagResources',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/tags`,
    method = 'PUT',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary You can add labels in key-value pairs to clusters. This allows cluster developers or O\\&M engineers to classify and manage clusters in a more flexible manner. This also meets the requirements for monitoring, cost analysis, and tenant isolation. You can call the TagResources operation to add labels to a cluster.
 *
 * @param request TagResourcesRequest
 * @return TagResourcesResponse
 */
async function tagResources(request: TagResourcesRequest): TagResourcesResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return tagResourcesWithOptions(request, headers, runtime);
}

model UnInstallClusterAddonsRequest {
  addons?: [ 
    {
      cleanupCloudResources?: boolean(name='cleanup_cloud_resources', description='Specifies whether to clear cloud resources.

*   true: clears the data and cloud resources.
*   false: retains the data and cloud resources.', example='true'),
      name?: string(name='name', description='The name of the component.', example='ack-node-problem-detector'),
    }
  ](name='addons', description='The list of components that you want to uninstall. The list is an array.'),
}

model UnInstallClusterAddonsResponseBody = {
  clusterId?: string(name='cluster_id', description='The ID of the cluster.', example='c5b5e80b0b64a4bf6939d2d8fbbc5****'),
  requestId?: string(name='request_id', description='The ID of the request.', example='74D1512F-67DA-54E8-99EA-4D50EB4898F4'),
  taskId?: string(name='task_id', description='The ID of the task.', example='T-66e39b39c0fdd001320005c0'),
}

model UnInstallClusterAddonsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UnInstallClusterAddonsResponseBody(name='body'),
}

/**
 * @summary Uninstalls components that you no longer need from a cluster. You must specify the name of the components and specify whether to release associated Alibaba Cloud resources from the cluster.
 *
 * @param request UnInstallClusterAddonsRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return UnInstallClusterAddonsResponse
 */
async function unInstallClusterAddonsWithOptions(ClusterId: string, request: UnInstallClusterAddonsRequest, headers: map[string]string, runtime: Util.RuntimeOptions): UnInstallClusterAddonsResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = Util.toArray(request.addons),
  };
  var params = new OpenApi.Params{
    action = 'UnInstallClusterAddons',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/clusters/${OpenApiUtil.getEncodeParam(ClusterId)}/components/uninstall`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Uninstalls components that you no longer need from a cluster. You must specify the name of the components and specify whether to release associated Alibaba Cloud resources from the cluster.
 *
 * @param request UnInstallClusterAddonsRequest
 * @return UnInstallClusterAddonsResponse
 */
async function unInstallClusterAddons(ClusterId: string, request: UnInstallClusterAddonsRequest): UnInstallClusterAddonsResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return unInstallClusterAddonsWithOptions(ClusterId, request, headers, runtime);
}

model UntagResourcesRequest {
  all?: boolean(name='all', description='Specifies whether to remove all custom labels. This parameter takes effect only when `tag_keys` is left empty. Valid values:

*   `true`: Remove all custom labels.
*   `false`: Do not remove all custom labels.', example='true'),
  regionId?: string(name='region_id', description='The region ID of the resources.

This parameter is required.', example='cn-hangzhou'),
  resourceIds?: [ string ](name='resource_ids', description='The list of resource IDs.

This parameter is required.'),
  resourceType?: string(name='resource_type', description='The type of resource. Set the value to `CLUSTER`.

This parameter is required.', example='CLUSTER'),
  tagKeys?: [ string ](name='tag_keys', description='The list of keys of the labels that you want to remove.

This parameter is required.'),
}

model UntagResourcesShrinkRequest {
  all?: boolean(name='all', description='Specifies whether to remove all custom labels. This parameter takes effect only when `tag_keys` is left empty. Valid values:

*   `true`: Remove all custom labels.
*   `false`: Do not remove all custom labels.', example='true'),
  regionId?: string(name='region_id', description='The region ID of the resources.

This parameter is required.', example='cn-hangzhou'),
  resourceIdsShrink?: string(name='resource_ids', description='The list of resource IDs.

This parameter is required.'),
  resourceType?: string(name='resource_type', description='The type of resource. Set the value to `CLUSTER`.

This parameter is required.', example='CLUSTER'),
  tagKeysShrink?: string(name='tag_keys', description='The list of keys of the labels that you want to remove.

This parameter is required.'),
}

model UntagResourcesResponseBody = {
  requestId?: string(name='RequestId', description='The request ID.', example='2D69A58F-345C-4FDE-88E4-BF51894XXXXX'),
}

model UntagResourcesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UntagResourcesResponseBody(name='body'),
}

/**
 * @summary If you no longer need the labels (key-value pairs) of a cluster, you can call the UntagResources operation to delete the labels.
 *
 * @param tmpReq UntagResourcesRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return UntagResourcesResponse
 */
async function untagResourcesWithOptions(tmpReq: UntagResourcesRequest, headers: map[string]string, runtime: Util.RuntimeOptions): UntagResourcesResponse {
  Util.validateModel(tmpReq);
  var request = new UntagResourcesShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.resourceIds)) {
    request.resourceIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.resourceIds, 'resource_ids', 'json');
  }
  if (!Util.isUnset(tmpReq.tagKeys)) {
    request.tagKeysShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.tagKeys, 'tag_keys', 'json');
  }
  var query : map[string]any = {};
  if (!Util.isUnset(request.all)) {
    query['all'] = request.all;
  }
  if (!Util.isUnset(request.regionId)) {
    query['region_id'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceIdsShrink)) {
    query['resource_ids'] = request.resourceIdsShrink;
  }
  if (!Util.isUnset(request.resourceType)) {
    query['resource_type'] = request.resourceType;
  }
  if (!Util.isUnset(request.tagKeysShrink)) {
    query['tag_keys'] = request.tagKeysShrink;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UntagResources',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/tags`,
    method = 'DELETE',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary If you no longer need the labels (key-value pairs) of a cluster, you can call the UntagResources operation to delete the labels.
 *
 * @param request UntagResourcesRequest
 * @return UntagResourcesResponse
 */
async function untagResources(request: UntagResourcesRequest): UntagResourcesResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return untagResourcesWithOptions(request, headers, runtime);
}

model UpdateClusterAuditLogConfigRequest {
  disable?: boolean(name='disable', description='Enable or disable audit logging.

*   false: enables audit logging or updates the audit logging configurations.
*   true: disables audit logging.', example='false'),
  slsProjectName?: string(name='sls_project_name', description='The [Simple Log Service project](https://help.aliyun.com/document_detail/48873.html) to which the [Logstore](https://help.aliyun.com/document_detail/48873.html) storing the cluster audit logs belongs.

*   Default value: k8s-log-{clusterid}.
*   After the cluster audit log feature is enabled, a Logstore is created in the specified Simple Log Service project to store cluster audit logs.
*   If you want to change the project after audit logging is enabled for the cluster, you can use this parameter to specify another project. You can perform this operation only in ACK managed clusters.', example='k8s-log-c82e6987e2961451182edacd74faf****'),
}

model UpdateClusterAuditLogConfigResponseBody = {
  clusterId?: string(name='cluster_id', description='The cluster ID.', example='c93095129fc41463aa455d89444fd****'),
  requestId?: string(name='request_id', description='The ID of the request.', example='48BD70F6-A7E6-543D-9F23-08DEB764C92E'),
  taskId?: string(name='task_id', description='The ID of the task.', example='T-5faa48fb31b6b8078d00****'),
}

model UpdateClusterAuditLogConfigResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateClusterAuditLogConfigResponseBody(name='body'),
}

/**
 * @summary You can call the UpdateClusterAuditLogConfig operation to enable or disable the audit log feature in a Container Service for Kubernetes (ACK) cluster and update the audit log configuration. This operation also allows you to record requests to the Kubernetes API and the responses, which can be used to trace cluster operation history and troubleshoot cluster issues.
 *
 * @description Before you call this operation, ensure that you understand the billing methods and pricing of [Simple Log Service](https://www.alibabacloud.com/product/log-service/pricing).
 *
 * @param request UpdateClusterAuditLogConfigRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateClusterAuditLogConfigResponse
 */
async function updateClusterAuditLogConfigWithOptions(clusterid: string, request: UpdateClusterAuditLogConfigRequest, headers: map[string]string, runtime: Util.RuntimeOptions): UpdateClusterAuditLogConfigResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.disable)) {
    body['disable'] = request.disable;
  }
  if (!Util.isUnset(request.slsProjectName)) {
    body['sls_project_name'] = request.slsProjectName;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateClusterAuditLogConfig',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/clusters/${OpenApiUtil.getEncodeParam(clusterid)}/audit_log`,
    method = 'PUT',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary You can call the UpdateClusterAuditLogConfig operation to enable or disable the audit log feature in a Container Service for Kubernetes (ACK) cluster and update the audit log configuration. This operation also allows you to record requests to the Kubernetes API and the responses, which can be used to trace cluster operation history and troubleshoot cluster issues.
 *
 * @description Before you call this operation, ensure that you understand the billing methods and pricing of [Simple Log Service](https://www.alibabacloud.com/product/log-service/pricing).
 *
 * @param request UpdateClusterAuditLogConfigRequest
 * @return UpdateClusterAuditLogConfigResponse
 */
async function updateClusterAuditLogConfig(clusterid: string, request: UpdateClusterAuditLogConfigRequest): UpdateClusterAuditLogConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return updateClusterAuditLogConfigWithOptions(clusterid, request, headers, runtime);
}

model UpdateContactGroupForAlertRequest {
  alertRuleGroupName?: string(name='alert_rule_group_name', description='The name of the alert contact group.', example='sample'),
  contactGroupIds?: [ long ](name='contact_group_ids', description='The list of contact group IDs.'),
  crName?: string(name='cr_name', description='The name of the container registry instance.', example='sample'),
  namespace?: string(name='namespace', description='The namespace in which the resource resides.', example='default'),
}

model UpdateContactGroupForAlertResponseBody = {
  msg?: string(name='msg', description='The error message returned if the call fails.', example='contact group illegal.'),
  status?: boolean(name='status', description='The update status.

*   true: The update is successful.
*   false: The update failed.', example='true'),
}

model UpdateContactGroupForAlertResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateContactGroupForAlertResponseBody(name='body'),
}

/**
 * @summary null
 *
 * @param request UpdateContactGroupForAlertRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateContactGroupForAlertResponse
 */
async function updateContactGroupForAlertWithOptions(ClusterId: string, request: UpdateContactGroupForAlertRequest, headers: map[string]string, runtime: Util.RuntimeOptions): UpdateContactGroupForAlertResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.alertRuleGroupName)) {
    body['alert_rule_group_name'] = request.alertRuleGroupName;
  }
  if (!Util.isUnset(request.contactGroupIds)) {
    body['contact_group_ids'] = request.contactGroupIds;
  }
  if (!Util.isUnset(request.crName)) {
    body['cr_name'] = request.crName;
  }
  if (!Util.isUnset(request.namespace)) {
    body['namespace'] = request.namespace;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateContactGroupForAlert',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/alert/${OpenApiUtil.getEncodeParam(ClusterId)}/alert_rule/contact_groups`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary null
 *
 * @param request UpdateContactGroupForAlertRequest
 * @return UpdateContactGroupForAlertResponse
 */
async function updateContactGroupForAlert(ClusterId: string, request: UpdateContactGroupForAlertRequest): UpdateContactGroupForAlertResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return updateContactGroupForAlertWithOptions(ClusterId, request, headers, runtime);
}

model UpdateControlPlaneLogRequest {
  aliuid?: string(name='aliuid', description='The ID of the Alibaba Cloud account.', example='162981*****', nullable=true),
  components?: [ string ](name='components', description='The control plane components for which you want to enable log collection.'),
  logProject?: string(name='log_project', description='The name of the Simple Log Service Project that you want to use to store the logs of control plane components.

Default value: k8s-log-$Cluster ID.', example='k8s-log-c5b5e80b0b64a4bf6939d2d8fbbc5****', nullable=true),
  logTtl?: string(name='log_ttl', description='The retention period of the log data stored in the Logstore. Valid values: 1 to 3000. Unit: days.

Default value: 30.', example='30', nullable=true),
}

model UpdateControlPlaneLogResponseBody = {
  clusterId?: string(name='cluster_id', description='The cluster ID.', example='cb95aa626a47740afbf6aa099b650****'),
  requestId?: string(name='request_id', description='The request ID.', example='687C5BAA-D103-4993-884B-C35E4314****'),
  taskId?: string(name='task_id', description='The task ID.', example='T-5a54309c80282e39ea00****'),
}

model UpdateControlPlaneLogResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateControlPlaneLogResponseBody(name='body'),
}

/**
 * @summary Modifies the log configurations of control plane components. The configurations include the log retention period and components whose logs that you want to collect. Container Service for Kubernetes (ACK) managed clusters can collect the logs of control plane components and deliver the logs to projects in Simple Log Service. These control plane components include Kube-apiserver, kube-scheduler, Kubernetes controller manager, and cloud controller manager (CCM).
 *
 * @param request UpdateControlPlaneLogRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateControlPlaneLogResponse
 */
async function updateControlPlaneLogWithOptions(ClusterId: string, request: UpdateControlPlaneLogRequest, headers: map[string]string, runtime: Util.RuntimeOptions): UpdateControlPlaneLogResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.aliuid)) {
    body['aliuid'] = request.aliuid;
  }
  if (!Util.isUnset(request.components)) {
    body['components'] = request.components;
  }
  if (!Util.isUnset(request.logProject)) {
    body['log_project'] = request.logProject;
  }
  if (!Util.isUnset(request.logTtl)) {
    body['log_ttl'] = request.logTtl;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateControlPlaneLog',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/clusters/${OpenApiUtil.getEncodeParam(ClusterId)}/controlplanelog`,
    method = 'PUT',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Modifies the log configurations of control plane components. The configurations include the log retention period and components whose logs that you want to collect. Container Service for Kubernetes (ACK) managed clusters can collect the logs of control plane components and deliver the logs to projects in Simple Log Service. These control plane components include Kube-apiserver, kube-scheduler, Kubernetes controller manager, and cloud controller manager (CCM).
 *
 * @param request UpdateControlPlaneLogRequest
 * @return UpdateControlPlaneLogResponse
 */
async function updateControlPlaneLog(ClusterId: string, request: UpdateControlPlaneLogRequest): UpdateControlPlaneLogResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return updateControlPlaneLogWithOptions(ClusterId, request, headers, runtime);
}

model UpdateK8sClusterUserConfigExpireRequest {
  expireHour?: long(name='expire_hour', description='The validity period of the kubeconfig file. Unit: hours.

> The value of expire_hour must be greater than 0 and equal to or smaller than 876000 (100 years).

This parameter is required.', example='720'),
  user?: string(name='user', description='The user ID.

This parameter is required.', example='The ID of the Resource Access Management (RAM) user that you use.'),
}

model UpdateK8sClusterUserConfigExpireResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
}

/**
 * @summary Sets the validity period of a kubeconfig file used by a Resource Access Management (RAM) user or RAM role to connect to a Container Service for Kubernetes (ACK) cluster. The validity period ranges from 1 to 876,000 hours. You can call this API operation when you customize configurations by using an Alibaba Cloud account. The default validity period of a kubeconfig file is three years.
 *
 * @description *   You can call this operation only with an Alibaba Cloud account.
 * *   If the kubeconfig file used by your cluster is revoked, the custom validity period of the kubeconfig file is reset. In this case, you need to call this API operation to reconfigure the validity period of the kubeconfig file.
 *
 * @param request UpdateK8sClusterUserConfigExpireRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateK8sClusterUserConfigExpireResponse
 */
async function updateK8sClusterUserConfigExpireWithOptions(ClusterId: string, request: UpdateK8sClusterUserConfigExpireRequest, headers: map[string]string, runtime: Util.RuntimeOptions): UpdateK8sClusterUserConfigExpireResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.expireHour)) {
    body['expire_hour'] = request.expireHour;
  }
  if (!Util.isUnset(request.user)) {
    body['user'] = request.user;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateK8sClusterUserConfigExpire',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/k8s/${OpenApiUtil.getEncodeParam(ClusterId)}/user_config/expire`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'none',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Sets the validity period of a kubeconfig file used by a Resource Access Management (RAM) user or RAM role to connect to a Container Service for Kubernetes (ACK) cluster. The validity period ranges from 1 to 876,000 hours. You can call this API operation when you customize configurations by using an Alibaba Cloud account. The default validity period of a kubeconfig file is three years.
 *
 * @description *   You can call this operation only with an Alibaba Cloud account.
 * *   If the kubeconfig file used by your cluster is revoked, the custom validity period of the kubeconfig file is reset. In this case, you need to call this API operation to reconfigure the validity period of the kubeconfig file.
 *
 * @param request UpdateK8sClusterUserConfigExpireRequest
 * @return UpdateK8sClusterUserConfigExpireResponse
 */
async function updateK8sClusterUserConfigExpire(ClusterId: string, request: UpdateK8sClusterUserConfigExpireRequest): UpdateK8sClusterUserConfigExpireResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return updateK8sClusterUserConfigExpireWithOptions(ClusterId, request, headers, runtime);
}

model UpdateResourcesDeleteProtectionRequest {
  enable?: boolean(name='enable', description='Specifies whether to enable deletion protection. Set the value to true to enable deletion protection and set the value to false to disable deletion protection.', example='true'),
  namespace?: string(name='namespace', description='The namespace to which the resource belongs.', example='default', nullable=true),
  resourceType?: string(name='resource_type', description='The type of resource for which deletion protection is enabled or disabled. You can specify namespaces or Services.', example='services'),
  resources?: [ string ](name='resources', description='The resources list.'),
}

model UpdateResourcesDeleteProtectionResponseBody = {
  namespace?: string(name='namespace', description='The namespace to which the resource belongs.', example='default'),
  protection?: string(name='protection', description='Indicates the status of deletion protection. A value of true indicates that deletion protection is enabled and a value of false indicates that deletion protection is disabled.', example='enable'),
  requestId?: string(name='requestId', description='Id of the request', example='0527ac9a-c899-4341-a21a-xxxxxxxxx'),
  resourceType?: string(name='resource_type', description='The type of resource for which deletion protection is enabled or disabled.', example='namespaces'),
  resources?: [ string ](name='resources', description='The list of resources whose deletion protection status is updated.'),
}

model UpdateResourcesDeleteProtectionResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateResourcesDeleteProtectionResponseBody(name='body'),
}

/**
 * @summary Updates the deletion protection status of the specified resources. You can enable or disable deletion protection for namespaces and Services. You can call this operation to enable deletion protection for namespaces or Services that involve businesses-critical and sensitive data to avoid incurring maintenance costs caused by accidental namespace or Service deletion.
 *
 * @param request UpdateResourcesDeleteProtectionRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateResourcesDeleteProtectionResponse
 */
async function updateResourcesDeleteProtectionWithOptions(ClusterId: string, request: UpdateResourcesDeleteProtectionRequest, headers: map[string]string, runtime: Util.RuntimeOptions): UpdateResourcesDeleteProtectionResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.enable)) {
    body['enable'] = request.enable;
  }
  if (!Util.isUnset(request.namespace)) {
    body['namespace'] = request.namespace;
  }
  if (!Util.isUnset(request.resourceType)) {
    body['resource_type'] = request.resourceType;
  }
  if (!Util.isUnset(request.resources)) {
    body['resources'] = request.resources;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateResourcesDeleteProtection',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/clusters/${OpenApiUtil.getEncodeParam(ClusterId)}/resources/protection`,
    method = 'PUT',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Updates the deletion protection status of the specified resources. You can enable or disable deletion protection for namespaces and Services. You can call this operation to enable deletion protection for namespaces or Services that involve businesses-critical and sensitive data to avoid incurring maintenance costs caused by accidental namespace or Service deletion.
 *
 * @param request UpdateResourcesDeleteProtectionRequest
 * @return UpdateResourcesDeleteProtectionResponse
 */
async function updateResourcesDeleteProtection(ClusterId: string, request: UpdateResourcesDeleteProtectionRequest): UpdateResourcesDeleteProtectionResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return updateResourcesDeleteProtectionWithOptions(ClusterId, request, headers, runtime);
}

model UpdateTemplateRequest {
  description?: string(name='description', description='The description of the template.', example='web server cluster'),
  name?: string(name='name', description='The name of the template.', example='webserver01'),
  tags?: string(name='tags', description='The label of the template.', example='web'),
  template?: string(name='template', description='The YAML content of the template.', example='apiVersion: apps/v1\\\\\\\\nkind: Deployment\\\\\\\\nmetadata:\\\\\\\\n  name: nginx-deployment-basic\\\\\\\\n  labels:\\\\\\\\n    app: nginx\\\\\\\\nspec:\\\\\\\\n  replicas: 2\\\\\\\\n  selector:\\\\\\\\n    matchLabels:\\\\\\\\n      app: nginx\\\\\\\\n  template:\\\\\\\\n    metadata:\\\\\\\\n      labels:\\\\\\\\n        app: nginx\\\\\\\\n    spec:\\\\\\\\n      containers:\\\\\\\\n      - name: nginx\\\\\\\\n        image: busybox:latest\\\\\\\\n        ports:\\\\\\\\n        - containerPort: 8080'),
  templateType?: string(name='template_type', description='The type of template. This parameter can be set to a custom value.

*   If the parameter is set to `kubernetes`, the template is displayed on the Templates page in the console.
*   If the parameter is set to `compose`, the template is displayed on the Container Service - Swarm page in the console. Container Service for Swarm is deprecated.', example='kubernetes'),
}

model UpdateTemplateResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
}

/**
 * @summary Updates the configurations of an orchestration template. An orchestration template defines and describes a group of Container Service for Kubernetes (ACK) resources. An orchestration template describes the configurations of an application or how an application runs in a declarative manner.
 *
 * @param request UpdateTemplateRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateTemplateResponse
 */
async function updateTemplateWithOptions(TemplateId: string, request: UpdateTemplateRequest, headers: map[string]string, runtime: Util.RuntimeOptions): UpdateTemplateResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.description)) {
    body['description'] = request.description;
  }
  if (!Util.isUnset(request.name)) {
    body['name'] = request.name;
  }
  if (!Util.isUnset(request.tags)) {
    body['tags'] = request.tags;
  }
  if (!Util.isUnset(request.template)) {
    body['template'] = request.template;
  }
  if (!Util.isUnset(request.templateType)) {
    body['template_type'] = request.templateType;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateTemplate',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/templates/${OpenApiUtil.getEncodeParam(TemplateId)}`,
    method = 'PUT',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'none',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Updates the configurations of an orchestration template. An orchestration template defines and describes a group of Container Service for Kubernetes (ACK) resources. An orchestration template describes the configurations of an application or how an application runs in a declarative manner.
 *
 * @param request UpdateTemplateRequest
 * @return UpdateTemplateResponse
 */
async function updateTemplate(TemplateId: string, request: UpdateTemplateRequest): UpdateTemplateResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return updateTemplateWithOptions(TemplateId, request, headers, runtime);
}

model UpdateUserPermissionsRequest {
  body?: [ 
    {
      cluster?: string(name='cluster', description='The ID of the cluster on which you want to grant permissions to the RAM role or RAM role.

*   Set this parameter to an empty string if `role_type` is set to `all-clusters`.', example='c796c60***'),
      isCustom?: boolean(name='is_custom', description='Specifies whether to assign a custom role to the RAM user or RAM role. If you want to assign a custom role to the RAM user or RAM role, set `role_name` to the name of the custom role.', example='false'),
      isRamRole?: boolean(name='is_ram_role', description='Specifies whether to use a RAM role to grant permissions.', example='false'),
      namespace?: string(name='namespace', description='The namespace that you want to authorize the RAM user or RAM role to manage. This parameter is required only if you set role_type to namespace.', example='test'),
      roleName?: string(name='role_name', description='The predefined role name. Valid values:

*   `admin`: administrator
*   `admin-view`: read-only administrator
*   `ops`: O\\\\&M engineer
*   `dev`: developer
*   `restricted`: restricted user
*   Custom role

Note:

*   You cannot grant **namespace-level** permissions to the `admin`, `admin-view`, and `ops` roles.
*   You cannot grant **all cluster-level** permissions to the `admin-view` role.', example='ops'),
      roleType?: string(name='role_type', description='The authorization type. Valid values:

*   `cluster`: authorizes the RAM user or RAM role to manage the specified clusters.
*   `namespace`: authorizes the RAM user or RAM role to manage the specified namespaces.
*   `all-clusters`: authorizes the RAM user or RAM role to manage all clusters.', example='cluster'),
    }
  ](name='body', description='The request body.'),
  mode?: string(name='mode', description='The authorization method. Valid values:

*   `apply`: updates all permissions of the RAM user or RAM role. If you use this method, the existing permissions of the RAM user or RAM role on the cluster are overwritten. You must specify all the permissions that you want to grant to the RAM user or RAM role in the request parameters when you call the operation.
*   `delete`: revokes the specified permissions from the RAM user or RAM role. If you use this method, only the permissions that you specify are revoked, while other permissions of the RAM user or RAM role on the cluster are not affected.
*   `patch`: grants the specified permissions to the RAM user or role. If you use this method, only the permissions that you specify are granted, while other permissions of the RAM user or RAM role on the cluster are not affected.

Default value: `apply`.', example='apply'),
}

model UpdateUserPermissionsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
}

/**
 * @summary Updates the role-based access control (RBAC) permissions of a Resource Access Management (RAM) user or RAM role. By default, you do not have the RBAC permissions on a Container Service for Kubernetes (ACK) cluster if you are not the cluster owner or you are not using an Alibaba Cloud account. You can call this operation to specify the resources that can be accessed, permission scope, and predefined roles. This helps you better manage the access control on resources in ACK clusters.
 *
 * @description **Precautions**:
 * *   You can update the permissions of a RAM user or RAM role on a cluster by using full update or incremental update. If you use full update, the existing permissions of the RAM user or RAM role on the cluster are overwritten. You must specify all the permissions that you want to grant to the RAM user or RAM role in the request parameters when you call the operation. If you use incremental update, you can grant permissions to or revoke permissions from the RAM user or RAM role on the cluster. In this case, only the permissions that you specify in the request parameters when you call the operation are granted or revoked, other permissions of the RAM user or RAM role on the cluster are not affected.
 *
 * @param request UpdateUserPermissionsRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateUserPermissionsResponse
 */
async function updateUserPermissionsWithOptions(uid: string, request: UpdateUserPermissionsRequest, headers: map[string]string, runtime: Util.RuntimeOptions): UpdateUserPermissionsResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.mode)) {
    query['mode'] = request.mode;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    query = OpenApiUtil.query(query),
    body = Util.toArray(request.body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateUserPermissions',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/permissions/users/${OpenApiUtil.getEncodeParam(uid)}/update`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'none',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Updates the role-based access control (RBAC) permissions of a Resource Access Management (RAM) user or RAM role. By default, you do not have the RBAC permissions on a Container Service for Kubernetes (ACK) cluster if you are not the cluster owner or you are not using an Alibaba Cloud account. You can call this operation to specify the resources that can be accessed, permission scope, and predefined roles. This helps you better manage the access control on resources in ACK clusters.
 *
 * @description **Precautions**:
 * *   You can update the permissions of a RAM user or RAM role on a cluster by using full update or incremental update. If you use full update, the existing permissions of the RAM user or RAM role on the cluster are overwritten. You must specify all the permissions that you want to grant to the RAM user or RAM role in the request parameters when you call the operation. If you use incremental update, you can grant permissions to or revoke permissions from the RAM user or RAM role on the cluster. In this case, only the permissions that you specify in the request parameters when you call the operation are granted or revoked, other permissions of the RAM user or RAM role on the cluster are not affected.
 *
 * @param request UpdateUserPermissionsRequest
 * @return UpdateUserPermissionsResponse
 */
async function updateUserPermissions(uid: string, request: UpdateUserPermissionsRequest): UpdateUserPermissionsResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return updateUserPermissionsWithOptions(uid, request, headers, runtime);
}

model UpgradeClusterRequest {
  componentName?: string(name='component_name', description='This parameter is deprecated. No need to pass values.', example='k8s', deprecated=true),
  masterOnly?: boolean(name='master_only', description='Specifies whether to upgrade only master nodes. Valid values:

*   true: upgrades master nodes only.
*   false: upgrades both master and worker nodes.', example='true'),
  nextVersion?: string(name='next_version', description='The target Kubernetes version for cluster upgrade.', example='1.16.9-aliyun.1'),
  rollingPolicy?: {
    maxParallelism?: int32(name='max_parallelism', description='The maximum number of nodes concurrently upgraded per batch.', example='3'),
  }(name='rolling_policy', description='The rolling update configuration.'),
  version?: string(name='version', description='This parameter is deprecated. Use next_version to specify the upgrade target Kubernetes version.', example='1.14.8-aliyun.1', deprecated=true),
}

model UpgradeClusterResponseBody = {
  clusterId?: string(name='cluster_id', description='Cluster ID.', example='c82e6987e2961451182edacd74faf****'),
  requestId?: string(name='request_id', description='Request ID.', example='0527ac9a-c899-4341-a21a-****'),
  taskId?: string(name='task_id', description='Task ID.', example='T-5faa48fb31b6b8078d00****'),
}

model UpgradeClusterResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpgradeClusterResponseBody(name='body'),
}

/**
 * @summary You can call the UpgradeCluster operation to upgrade a cluster by cluster ID.
 *
 * @description After successfully calling the UpgradeCluster interface, this API returns the `task_id` of the upgrade task. You can manage this operation task by calling the following task APIs:
 * - [Call DescribeTaskInfo to query task details](https://help.aliyun.com/document_detail/2667985.html)
 * - [Call PauseTask to pause a running task](https://help.aliyun.com/document_detail/2667986.html) 
 * - [Call ResumeTask to resume a task that has been paused](https://help.aliyun.com/document_detail/2667987.html) 
 * - [Call CancelTask to cancel a running task](https://help.aliyun.com/document_detail/2667988.html)
 *
 * @param request UpgradeClusterRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpgradeClusterResponse
 */
async function upgradeClusterWithOptions(ClusterId: string, request: UpgradeClusterRequest, headers: map[string]string, runtime: Util.RuntimeOptions): UpgradeClusterResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.componentName)) {
    body['component_name'] = request.componentName;
  }
  if (!Util.isUnset(request.masterOnly)) {
    body['master_only'] = request.masterOnly;
  }
  if (!Util.isUnset(request.nextVersion)) {
    body['next_version'] = request.nextVersion;
  }
  if (!Util.isUnset(request.rollingPolicy)) {
    body['rolling_policy'] = request.rollingPolicy;
  }
  if (!Util.isUnset(request.version)) {
    body['version'] = request.version;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpgradeCluster',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/api/v2/clusters/${OpenApiUtil.getEncodeParam(ClusterId)}/upgrade`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary You can call the UpgradeCluster operation to upgrade a cluster by cluster ID.
 *
 * @description After successfully calling the UpgradeCluster interface, this API returns the `task_id` of the upgrade task. You can manage this operation task by calling the following task APIs:
 * - [Call DescribeTaskInfo to query task details](https://help.aliyun.com/document_detail/2667985.html)
 * - [Call PauseTask to pause a running task](https://help.aliyun.com/document_detail/2667986.html) 
 * - [Call ResumeTask to resume a task that has been paused](https://help.aliyun.com/document_detail/2667987.html) 
 * - [Call CancelTask to cancel a running task](https://help.aliyun.com/document_detail/2667988.html)
 *
 * @param request UpgradeClusterRequest
 * @return UpgradeClusterResponse
 */
async function upgradeCluster(ClusterId: string, request: UpgradeClusterRequest): UpgradeClusterResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return upgradeClusterWithOptions(ClusterId, request, headers, runtime);
}

model UpgradeClusterAddonsRequest {
  body?: [ 
    {
      componentName?: string(name='component_name', description='The name of the component.

This parameter is required.', example='coredns'),
      config?: string(name='config', description='The custom component settings that you want to use. The value is a JSON string.', example='{\\\\"CpuRequest\\\\":\\\\"800m\\\\"}'),
      nextVersion?: string(name='next_version', description='The version to which the component can be updated. You can call the `DescribeClusterAddonsVersion` operation to query the version to which the component can be updated.

This parameter is required.', example='1.6.7'),
      policy?: string(name='policy', description='The update policy. Valid values:

*   overwrite
*   canary', example='canary'),
      version?: string(name='version', description='The current version of the component.', example='v1.6.2'),
    }
  ](name='body', description='The request parameters.'),
}

model UpgradeClusterAddonsResponseBody = {
  clusterId?: string(name='cluster_id', description='The cluster ID.', example='cf4299b79b3e34226abfdc80a4bda****'),
  requestId?: string(name='request_id', description='The request ID.', example='bfd12953-31cb-42f1-8a36-7b80ec345094'),
  taskId?: string(name='task_id', description='The task ID.', example='T-62a944794ee141074400****'),
}

model UpgradeClusterAddonsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpgradeClusterAddonsResponseBody(name='body'),
}

/**
 * @summary Updates cluster components to use new features and patch vulnerabilities. You must update cluster components one after one and update a component only after the previous one is successfully updated. Before you update a component, we recommend that you read the update notes for each component. Cluster component updates may affect your businesses. Assess the impact, back up data, and perform the update during off-peak hours.
 *
 * @param request UpgradeClusterAddonsRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpgradeClusterAddonsResponse
 */
async function upgradeClusterAddonsWithOptions(ClusterId: string, request: UpgradeClusterAddonsRequest, headers: map[string]string, runtime: Util.RuntimeOptions): UpgradeClusterAddonsResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = Util.toArray(request.body),
  };
  var params = new OpenApi.Params{
    action = 'UpgradeClusterAddons',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/clusters/${OpenApiUtil.getEncodeParam(ClusterId)}/components/upgrade`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Updates cluster components to use new features and patch vulnerabilities. You must update cluster components one after one and update a component only after the previous one is successfully updated. Before you update a component, we recommend that you read the update notes for each component. Cluster component updates may affect your businesses. Assess the impact, back up data, and perform the update during off-peak hours.
 *
 * @param request UpgradeClusterAddonsRequest
 * @return UpgradeClusterAddonsResponse
 */
async function upgradeClusterAddons(ClusterId: string, request: UpgradeClusterAddonsRequest): UpgradeClusterAddonsResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return upgradeClusterAddonsWithOptions(ClusterId, request, headers, runtime);
}

model UpgradeClusterNodepoolRequest {
  imageId?: string(name='image_id', description='The ID of the OS image that is used by the nodes.', example='aliyun_2_1903_x64_20G_alibase_20200529.vhd'),
  kubernetesVersion?: string(name='kubernetes_version', description='The Kubernetes version that is used by the nodes. You can call the [DescribeKubernetesVersionMetadata](https://help.aliyun.com/document_detail/2667899.html) operation to query the Kubernetes version of the cluster returned in the current_version parameter.', example='1.22.15-aliyun.1'),
  nodeNames?: [ string ](name='node_names', description='The nodes that you want to update. If you do not specify this parameter, all nodes in the node pool are updated by default.'),
  rollingPolicy?: {
    batchInterval?: int32(name='batch_interval', description='The update interval between batches takes effect only when the pause policy is set to NotPause. Unit: minutes. Valid values: 5 to 120.', example='5 minutes'),
    maxParallelism?: int32(name='max_parallelism', description='The maximum number of nodes per batch.', example='3'),
    pausePolicy?: string(name='pause_policy', description='The policy that is used to pause the update. Valid values:

*   FirstBatch: pauses the update after the first batch is completed.
*   EveryBatch: pauses after each batch is completed.
*   NotPause: does not pause.', example='NotPause'),
  }(name='rolling_policy', description='The rotation configuration.'),
  runtimeType?: string(name='runtime_type', description='The runtime type. You can call the [DescribeKubernetesVersionMetadata](https://help.aliyun.com/document_detail/2667899.html) operation to query the runtime information returned in the runtime parameter.', example='containerd'),
  runtimeVersion?: string(name='runtime_version', description='The version of the container runtime that is used by the nodes. You can call the [DescribeKubernetesVersionMetadata](https://help.aliyun.com/document_detail/2667899.html) operation to query the runtime version returned in the runtime parameter.', example='1.5.10'),
  useReplace?: boolean(name='use_replace', description='Specifies whether to perform the update by replacing the system disk. Valid values:

*   true: updates by replacing the system disk.
*   false: does not update by replacing the system disk.

Default value: false.', example='false'),
}

model UpgradeClusterNodepoolResponseBody = {
  requestId?: string(name='RequestId', description='The request ID.', example='2D69A58F-345C-4FDE-88E4-BF518944****'),
  taskId?: string(name='task_id', description='The task ID.', example='T-5fd211e924e1d0078700xxxx'),
}

model UpgradeClusterNodepoolResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpgradeClusterNodepoolResponseBody(name='body'),
}

/**
 * @summary You can call the UpgradeClusterNodepool operation to update the Kubernetes version, OS version, or container runtime version of the nodes in a node pool.
 *
 * @description This operation allows you to update the Kubernetes version, OS version, or container runtime version of the nodes in a node pool.
 *
 * @param request UpgradeClusterNodepoolRequest
 * @param headers map
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpgradeClusterNodepoolResponse
 */
async function upgradeClusterNodepoolWithOptions(ClusterId: string, NodepoolId: string, request: UpgradeClusterNodepoolRequest, headers: map[string]string, runtime: Util.RuntimeOptions): UpgradeClusterNodepoolResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.imageId)) {
    body['image_id'] = request.imageId;
  }
  if (!Util.isUnset(request.kubernetesVersion)) {
    body['kubernetes_version'] = request.kubernetesVersion;
  }
  if (!Util.isUnset(request.nodeNames)) {
    body['node_names'] = request.nodeNames;
  }
  if (!Util.isUnset(request.rollingPolicy)) {
    body['rolling_policy'] = request.rollingPolicy;
  }
  if (!Util.isUnset(request.runtimeType)) {
    body['runtime_type'] = request.runtimeType;
  }
  if (!Util.isUnset(request.runtimeVersion)) {
    body['runtime_version'] = request.runtimeVersion;
  }
  if (!Util.isUnset(request.useReplace)) {
    body['use_replace'] = request.useReplace;
  }

  var req = new OpenApi.OpenApiRequest{ 
    headers = headers,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpgradeClusterNodepool',
    version = '2015-12-15',
    protocol = 'HTTPS',
    pathname = `/clusters/${OpenApiUtil.getEncodeParam(ClusterId)}/nodepools/${OpenApiUtil.getEncodeParam(NodepoolId)}/upgrade`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary You can call the UpgradeClusterNodepool operation to update the Kubernetes version, OS version, or container runtime version of the nodes in a node pool.
 *
 * @description This operation allows you to update the Kubernetes version, OS version, or container runtime version of the nodes in a node pool.
 *
 * @param request UpgradeClusterNodepoolRequest
 * @return UpgradeClusterNodepoolResponse
 */
async function upgradeClusterNodepool(ClusterId: string, NodepoolId: string, request: UpgradeClusterNodepoolRequest): UpgradeClusterNodepoolResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers : map[string]string = {};
  return upgradeClusterNodepoolWithOptions(ClusterId, NodepoolId, request, headers, runtime);
}

